This topic is now archived and is closed to further replies.


3D to 2D projection problems..

Recommended Posts

Hi, I want to use my own projection matrix hiven by some function like : void SetProjection(FOV, Aspect, ZNear, ZFar); It setups projection matrix that works in software renderer. It also produces W-coordinate. My question is why I cannot see anything when I put this W-coordinate into glVertex4f(x, y, z, W)???? My code is something like : glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, W, 0, H, 1, 10000); And then I apply projection matrix : for (i=0;, l_ResultVector, lf_W); L1_POLYGON.vertexes[i].xyz = l_ResultVector; L1_POLYGON.vertexes[i].rhw = lf_W; } And then some viewport : for (i=0; i

Share this post

Link to post
Share on other sites