Jump to content
  • Advertisement
Sign in to follow this  
SuperFunHappyMeowCat

Squares wont show up!

This topic is 4815 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

When i run this code to render my squares nothing shows up...unless I uncomment the drawing of the m_pTest mesh... void CtileEngine::TileRender() { VERTEX Verts[6]; m_pDevice->Clear(0, 0, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DXCOLOR(0, 0, 0, 0), 1.0f, 0); m_pDevice->BeginScene(); for(int X = -m_nWidth; X <= m_nWidth; X+=16) { for(int Y = -m_nHeight; Y <= m_nHeight; Y+=16) { Verts[0] = VERTEX(X-8, Y-8); Verts[1] = VERTEX(X-8, Y+8); Verts[2] = VERTEX(X+8, Y+8); Verts[3] = VERTEX(X+8, Y-8); Verts[4] = Verts[0]; Verts[5] = Verts[2]; m_pDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 2 , Verts, sizeof(VERTEX)); } } //m_pTest->DrawSubset(0); ////if this runs, everything /////works...but with a teapot in the center m_pDevice->EndScene(); m_pDevice->Present(0, 0, 0, 0); }; Also...how do you post code?

Share this post


Link to post
Share on other sites
Advertisement
Did you set the vertex format? (DX8: SetVertexShader, DX9: SetFVF)

If that doesn't solve it, switch the DirectX runtime to debug in the control panel and crank up the debug output level to maximum. Also check maximum validation and break on error.

This should give you a nice debug spew in the output display.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!