Original Post
Hey there,
What could be some causes for any vertices with components in the z axis just not being drawn?
triangle[i++].setVertices( 100, 0, 0); // x axis
triangle[i++].setVertices(-100, 0, 0);
triangle[i++].setVertices( 0, 100, 0); // y axis
triangle[i++].setVertices( 0, -100, 0);
triangle[i++].setVertices( 0, 0, 100); // z axis
triangle[i++].setVertices( 0, 0, -100);
For Lines List rendering. The z-axis is not drawn.
Render states.
g_pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
g_pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
g_pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);
Matrices as follows:
D3DXMATRIX mat;
D3DXMatrixPerspectiveFovLH(&mat, D3DX_PI/6, WINDOW_WIDTH/WINDOW_HEIGHT, 1.0, 100.0);
g_pDevice->SetTransform(D3DTS_PROJECTION, &(D3DMATRIX)mat);
D3DXMatrixIdentity(&mat);
g_pDevice->SetTransform(D3DTS_WORLD, &(D3DMATRIX)mat);
D3DXMatrixTranslation(&mat, 0.0f, 0.0f, 100.0);
g_pDevice->SetTransform(D3DTS_VIEW, &(D3DMATRIX)mat);
D3DXMatrixRotationZ(&mat, rot+=0.01f);
g_pDevice->SetTransform(D3DTS_WORLD, &(D3DMATRIX)mat);
Also I use two vertex buffers one for unprocessed and another for processed. The first two lines are drawn and rotate accordingly. Also for Lines List I have 3 in 3rd arguement.
Anything wrong?
Thanks for any help.
Edited by - -=Code=- on December 24, 2001 5:36:39 AM
Edited by - -=Code=- on December 24, 2001 5:37:03 AM