Screen Coordinates

I have multiplied my object coordinates by
the modelview and projection matrices.
What is this perspective divide that I apparently
need to do to convert from Clip Coordinates
to Screen coordinates.
It appears that I must divide x,y,z by w.
but w is 1.0 because I don’t bother setting or
changing it becuase I have no need.
So I won’t have a value between -1 and 1
to convert to screen coordinates.

Please explain how I do this.

The modelview and projection matrices are 4x4, right? So you should be setting w to something. Look up “homogeneous coordinates” for more info.

This is manually speaking, right? Because normally OpenGL does all of this for you…

Look at the spec page 42. The projection matrix will set the clip coords’ 4th component wc to something other than 1.0, then the normalized device coords are obtained by dividing xc, yc and zc by wc.