Sign in to follow this  

Mesh Object Not Rendering

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

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

Sign in to follow this