Is there a way to use opengl to do 2D rendering without perspective,
I want to use this for top, side and front views
of wireframe objects
hi,
i believe you can use the gluOrtho2D function with the projection matrix to achieve this
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluOrtho2D(0.0, 1.0, 0.0, 1.0);
then use the modelview matrix with glRasterPos function.
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glRasterPos3f(0, 0, 0.0);
…
for more details OpenGL Red Book: Chapter 3 - Veiwing
hope this helps
Also, if you still want to draw polygons, etc., you can use glVertex2f(). (glRasterPos() is good if you’re drawing pixels).