Hi I'm trying to figure out how to structure my game. My plan is to have objects that consists of several children that could be separated from the parent, like a human losing an arm etc. But my problem seems to be how to do with the meshes. My meshes can consist of several sub meshes and for a humanoid each part needs to be associated with a sub mesh, because my humanoid models are built as such. So how would be a good idea to go about accomplishing this? Should I split the mesh into several meshes consisting of a sub mesh each and associate the limb objects with this or do I associate each limb with a sub mesh?
If I split the full mesh into several other new meshes consisting of one limb each it feels useless to have a sub mesh class since I'd need to split most multiple-submesh-meshes up into their own individual meshes anyway. I also need to associate some objects with meshes (consisting of an arbitrary number of sub meshes) that are not supposed to be split or anything fancy like that.
I don't know if there are some obvious errors with my suggestions or if there's a good solution but I'd like to hear you guys' thoughts on this.
I've tried to make sure the matrices and everything is working as intended. I can render a Teapot created with D3DXCreateTeapot() but when I try to render my cube with an IB and a VB nothing is being shown. I also get no errors from any of the functions.
If I don't call the SetFVF() I get the error saying "Vertex shader declaration not set" which makes me think if the device is trying to render using a vertex shader though I have not set any/compiled any or loaded any.
I'm creating my own classes for windows in Win32 API and I now wonder what approach I should be taking for the message procedures.
I thought I'd have some functions like OnButtonDown() but how would I make this happen? Should the message procedure be hidden from the user of the classes so they should only be concerned about the OnButtonDown() functions? What are some good approaches accomplishing this? Is it a good idea at all?
These classes would be used for my editor and I'm using Object Oriented Programming, if that's any use for anyone.