Orthogonal view

Can anyone plese explain to me how to use orthogonal view to create a HUD for my game? I have tried it and it seems I have to reset my modelview matrix which seems unreasonable just to be able to use gl.ortho() ?

Basically, I want to be able to add something using ortho to the hud… at any time by using pushmatrix etc perhaps?

(This should be in the LWJGL forum - admin please move!)

Yep, OpenGL guarantees at least a two-depth projection matrix, so you can just push/pop to save/restore your “game” view. Just switch to the projection matrix, push it onto the stack, set up your orthogonal view and render your HUD. Pop the matrix off and you’re done. Don’t forget to switch back to the modelling matrix! :wink:

You might get extra speed by putting your orthogonal-view setup code into a display list. YMMV.

ah, nice one! :slight_smile:
Display lists are cool, easy and (I hope) fast :stuck_out_tongue:

[quote](This should be in the LWJGL forum - admin please move!)
[/quote]
No, this is an openGL question, not a LWJGL one.

True, but there isn’t an OpenGL forum here…

I figure it’s easier to move it to the LWJGL forum than to move it to http://www.opengl.org/discussion_boards/cgi_directory/forumdisplay.cgi?action=topics&number=2 :stuck_out_tongue: ;D