for some reason , i cannot display q triangle using a basic fx effect if there is a .x model rendering, ive even trying with vertex shaders and i still have the same problem , if i can get it to work then the goal is to render the joints but now i am just trying a triangle seperate the from the model , has anyone encountered this sort of problem before?
vertex shader
if(m_pAsm_VS)
{
D3DXMATRIX i,w,f,compMat,matProj;
//D3DXMatrixIdentity(&i);
D3DXMatrixRotationY(&i,z);
D3DXMatrixTranslation(&w,0.0f,0.0f,-5.0f);
f = i * w;
D3DXMatrixMultiply(&compMat,&f,&(w *matView));
D3DXMatrixMultiply(&compMat,&compMat,&matProjection);
D3DXMatrixTranspose(&compMat,&compMat);
d3ddev->SetVertexShaderConstantF(0,(float*)&compMat,4);
d3ddev->SetVertexDeclaration(m_pVertexDeclaration);
d3ddev->SetVertexShader(m_pAsm_VS);
d3ddev->SetStreamSource(0,m_pVB,0,sizeof(CUSTOMASMVERTEX));
d3ddev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 1);
d3ddev->SetVertexShader(NULL);
}
so if i comment out this line
// render each mesh container
//draw_mesh((CUSTOM_FRAME*)TopFrame);
then the triangle above renders
cannot use shaders with animated mesh .x
Use PIX debugger to figure out if the render states are being messed up by the earlier draw_mesh() calls to the point where your your DrawPrimitive for the triangle doesn't appear correctly.
You don't show the content of draw_mesh() either, does it use the effects framework? Are you specifying this flag anywhere? D3DXFX_DONOTSAVESTATE
You don't show the content of draw_mesh() either, does it use the effects framework? Are you specifying this flag anywhere? D3DXFX_DONOTSAVESTATE
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement