have you met this kind of problem?
when I drawed vertices in my Render() function, I found that if the plane is entirely in the screen, it wouldn''t be showed, however if I moved my camera and so let the plane is partly in the screen, it would be showed. why did this kind of problem occur ?
PS(some of my codes):
typedef struct tagNormalVertex
{
FLOAT x, y, z;
FLOAT nx, ny, nz;
FLOAT tu, tv;
} NormalVertex;
VOID Render()
{
// sorry I can''t remember the parameters
g_lpD3DDevice->BeginScene(..);
g_lpD3DDevice->Clear(...);
g_lpD3DDevice->SetStreamSource(....);
g_lpD3DDevice->SetVertexShader(...);
g_lpD3DDevice->SetIndices(...);
// Control camare ,set view and projection matrix
......
// Now drawing.
g_lpD3DDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, dwNumOfVerices, 0, dwNumOfPolygons);
g_lpD3DDevice->EndScene(..);
g_lpD3DDevice->Present(NULL, NULL, NULL, NULL);
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement