PDA

View Full Version : NDC coords to screen coords



mjs1
11-02-2004, 06:09 PM
As an exerise I'm defining the modelview, projection, and viewport transformations by myself and am not using OpenGL's pipeline. I have successfully created modelview and projection matrices which I multiply against a point and successfully display the point on the screen (I have set the OpenGL modelview and projection matrices to identity). OpenGL is still converting my NDC coordinates to screen coordinates automatically.

How do I take my NDC coordinates and convert them to screen coordinates by myself, using OpenGL only as a drawing device? I know how to convert the actual points to screen coordinates, but how do I disable OpenGL's automatic transformation of input (and assumed NDC) coordinates to screen coordinates?

mikael_aronsson
11-02-2004, 11:58 PM
Use orthographics projection and setup the matrices so one corrdinate maps to one pixel.

Mikael