🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Untitled

posted in DruinkJournal
Published August 24, 2006
Advertisement
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 meshm_pMesh = NEW SOMD2Mesh("Mesh");m_pMesh->SetResource("Data/Test/test.md2");m_pMesh->SetTransform(Matrix().SetToTranslation(0.0f, 0.0f, 150.0f));m_pMesh->SetVisible(true);// Create GUI windowsize_t nAnims = m_pMesh->GetNumAnimations();SOSprite::SP pBackground = NEW SOSprite("");pBackground->SetWidth(256.0f);pBackground->SetHeight((float)(nAnims*24 + 40));pBackground->SetColour(0xff000000);pBackground->SetVisible(true);m_pWindow = NEW CGUIWindow(10, 50, pBackground);// Add buttonsfor(size_t i=0; i{   SOSprite::SP pBackground = NEW SOSprite("");   pBackground->SetWidth(200.0f);   pBackground->SetHeight(20);   pBackground->SetColour(0xff0000ff);   pBackground->SetVisible(true);   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.
Previous Entry Untitled
Next Entry Untitled
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement