Screen Cordinates?

Started by
1 comment, last by HPK 21 years, 8 months ago
there is any way to use screen cordinates to draw the vertices in opengl?
Advertisement
Use an orthographic projection matrix with 0,height as the bottom left and width,0 as the top right. Look up the glOrtho function.

  void useWindowSizeOrthographicProjection(){    glMatrixMode(GL_PROJECTION);        glLoadIdentity();        gluOrtho2D(0, (GLfloat)windowWidth, 0, (GLfloat)windowHeight);    glMatrixMode(GL_MODELVIEW);}  

This topic is closed to new replies.

Advertisement