Another screenshot:
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.