Jump to content
  • Advertisement
Sign in to follow this  
Raeldor

Mesh Object Not Rendering

This topic is 4824 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 have built a mesh object from scratch, but it is not rendering. I have lighting off and culling set to none. My mesh is built using vertex format... // setup vertex format D3DVERTEXELEMENT9 VertexFormat[] = { { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, { 0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, { 0, 24, D3DDECLTYPE_D3DCOLOR , D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; using the line... if (FAILED(D3DXCreateMesh(nTriangleCount, nTriangleCount*3, D3DXMESH_MANAGED | D3DXMESH_32BIT, VertexFormat, InEngine.pD3DDevice, &pMesh))) return FALSE; which is completing sucessfully. My vertex and index buffers are being filled sucessfully and I am then using... // calculate normals if (FAILED(D3DXComputeNormals(pMesh, NULL))) return FALSE; which also completes sucessfully. Still nothing. I know it is not my camera etc, because I am rending a hardcoded primitive which I can see fine. What am I missing here? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Hmm, think I found the problem. I removed color from the vertex format and
it worked.

How come position and color alone is not a valid FVF?

Rael

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!