Modern OpenGL & Shaders

So, I think I understand how modern GL code is supposed to be written and I want to make sure I’m right.
I am supposed to manage my own matrix/matrices instead of using glXXX (glPush/PopMatrix, glTranslate, glScale, etc.).
Then, I am supposed to use a shader that takes that matrix (and whatever else is needed) to do the rendering.

Am I right so far?

So if I have to manage matrices myself, can I just write my own implementation of glPushMatrix, glPopMatrix, glTranslate, etc. myself? Is this a good idea?

Yes, though this has been the case for many years w/ GL at this point. You manage your own matrix stack as necessary.

Alrighty, good to know.

Also check out JOML https://github.com/JOML-CI for doing the maths. Don’t use it myself but seems to be pretty popular and certainly has all the features you’ll be needing. I believe it even has it’s own matrix stack implementation.

Big +1 for JOML. They have a perfect MatrixStackf class which has all the functions of the old OpenGL matrix stack, plus much more. It’s all lightning fast too. Seriously, check that shit out.