Imaginary human

BlitzMax Forums/BlitzMax OpenGL Programming/Imaginary human

If you are thinking to actually improve upon Max2D you will either have to decide to throw Max2D out and completely replace all of its parts or each time you do custom OpenGL calls you'll have to store all of the current OpenGL `state` onto some stack and restore it afterwards. Max2D assumes that it's making changes to the state/settings and that they are in known conditions so if you go changing things by directly making OpenGL calls you are likely to change something in a way that Max2D isn't expecting, resulting in it breaking and giving unpredictable results.

glRotatef() I think replaces SetRotation, and glScale() would replace SetScale, and glTranslate would replace positioning an object by a handle position.

e.g.

glTranslate - move to the center of the object, or its handle position
glRotate - rotate it around Z axis

I don't know what collision detection stuff would work with OpenGL. You may have to write your own. I would say that if you want to improve upon Max2D you need to be intent to throw it out the window and rewrite your own OpenGL routines, your own collision detection and your own image/texture handling. You need to design a new system from the ground up to accomodate what you want it to do -rehashing something that is poorly implemented isn''t going to help you much.