I'm trying to implement a GUI system in my game that uses opengl. I know that to do 2D you need to make a call to gl.glOrthof and to do 3D you make a call to gl.glPerspective when the view is set up or changed.

My problem is that idk how I would be able to make a call to both of them at the same time. I'm not a professional with OpenGL or anything I've only been using it for a couple of weeks but I'm not like a complete noob at it either.

These are the two functions in my program which I think are what need to be changed

any help is greatly appreciated as this is the only thing stopping me from finishing my game

and also please dont just say "you can check out my project at http://imtoolazytohelpyou.com" because that doesn't help and is a pain in the ass for other people looking for a solution to the same problem