Advertisement Jump to content
Sign in to follow this  

OpenGL Milkshape3D with Indexbuffers

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I had previously implemented MS3D skeletal animation using OpenGL and I am trying to do it again in DX. The triangles are index so I thought that it would be real easy to implement the indexbuffer and then just chagne the vertex buffer for animation. Turns out that the MS3D file stores the texture coords and normal info with the triangle and not with the vertex, this wasn't really an issue with GL doing GLVertex3f, then setting normals and texture coords. In DX I have to put the texture coords and normal into the VB, which involves searching through the triangle indexes for the right vertex and then adding the tex and normal, then searching again on the next vertex. Is there something I'm missing that will make this easier or should I just make my own format(probably should've just done that from the beginning. Here is the structure of the triangle and vertex:
public struct MS3DVertex
	public byte flags;
	public float[] vertex;
	public char boneID;
	public byte refCount;

public struct MS3DTriangle
	public short flags;
	public short[] vertexIndices;
	public float[] vertexNormals; //[3],[3]
	public float[] s;
	public float[] t;
	public byte smoothingGroup;
	public byte groupIndex;
Thanks, Drognan

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!