Ok, so yeah, I'm working on a physics library for the gdk. But one thing I need to know is how to access the data in IDirect3DVertexBuffer9 and IDirect3DIndexBuffer9. I'm asking here because I know a few people know how to do this. I've looked and so far the only way I have of accessing it is to make a pointer to a void object and get the data, but it still doesn't make much sense to me. So how would I do this? To give you more of an idea of what I'm doing, I'm trying to get an array filled with vertex data and index data.
Edit - I solved this. For those planning on adding physics or anything that needs index or vertex buffers, I'm adding it as part of my library(which I'll release a physics independent also). The vertex and index buffer will automaticlly be stored inside the object class I'm making(which is actually called dObjectNode).
Edit 2 - Ok, new problem. When working with the SObject struct, there is a pointer to a mesh list. Now, would I access the mesh lists draw buffer by just doing:
sObject* obj = new sObject() // I know this isn't right, but bare with me
sMesh* mesh = obj->ppMeshList;
sDrawBuffer* buffer = mesh->pDrawBuffer;
IDirect3DVertexBuffer* vertexBuffer = buffer->pVertexBufferRef;
IDirect3DIndexBuffer* indexBuffer = buffer->pIndexBufferRef;
So would that be a viable way to get the vertex and index buffers of a mesh?
WC Physics - PhysX wrapper for Dark GDK.