Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Evil Steve


Ok, MD2 animation is working. I haven't tried texturing, but I see no reason why that's not working too. Also, my GUI stuff is pretty nice for getting code up and running fast.

Another screenshot:

Engine screenie
Click to Enlarge

And the code for setting up that scene (GUI and mesh):

// Create mesh
m_pMesh = NEW SOMD2Mesh("Mesh");
m_pMesh->SetTransform(Matrix().SetToTranslation(0.0f, 0.0f, 150.0f));

// Create GUI window
size_t nAnims = m_pMesh->GetNumAnimations();
SOSprite::SP pBackground = NEW SOSprite("");
pBackground->SetHeight((float)(nAnims*24 + 40));
m_pWindow = NEW CGUIWindow(10, 50, pBackground);

// Add buttons
for(size_t i=0; i{
SOSprite::SP pBackground = NEW SOSprite("");
m_pWindow->Attach(NEW CButtonWidget(100+i, m_pWindow, 28, (i+1)*24,
pBackground, m_pMesh->GetAnimationName(i)));

So, what's next? Well, I still want to optimize the triangle stuff like I mentioned earlier, but that's not too important. MD2 is a pretty simple format, and has a hard limit of 4096 triangles (Imposed by the spec, not the file format though).
I really want to get texturing working, and lighting, and then bump mapping or something, and specular too. I also want to optimize my vertex and index buffer usage, by stuffing several similar VBs together. If I don't use FVF at all, then I belive I can just jam all the info together without too much difficulty.

Anyway, I'm bored. I'm going to watch a film and goto bed.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!