Search code examples
c++opengl3dprojection

glortho zox plane projection


I need to make an opengl projection on a plane paralel with XOZ plane (perpendicular on OY).

Can you explain me what parameters I should use with glOrtho to make this projection.

Thanks,


Solution

  • The wording of your question is not entirely clear to me, but if you want to display things in a "2D" fashion, this is how to do it:

    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(0, window_x_size, window_y_size, 0, 0, 1);