have you met this kind of problem?

Started by
1 comment, last by renqilin 21 years ago
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); }
Advertisement
how can you not remember the parameters... those would be wy it doesn''t work...
the plane would only be showed when it is partly in the screen, that means if any part of the plane is out of screen, it would be drawed by D3D.So I think if those parameters are wrong, maybe the plane would never be drawed.

This topic is closed to new replies.

Advertisement