Easy 2D OpenGL Framework
A GLUT framework wrapper designed to make getting a simple graphical application going quickly.
GL Framework provides a bare-bones intro to graphics programming with OpenGL and GLUT.
Detailed documentation available at: http://doxy.glutfmk.evanedstrom.com
The framework is comprised of two main components, Engine and Element.
- Initializes GLUT and handles key events, window resizing, projection matrix setup / scaling, and a basic frame timer.
- Contains a list of Elements that are drawn on each frame.
- Provides before draw loop and after draw loop virtual functions for things like scorekeeping or collision detection.
- Subscribes to events for key and mouse handling.
- Contains a coordinate system for positioning objects in 3D space.
- Contains velocity, scale and rotation variables.
- Draw() and Move() functions called in engine display loop using polymorphism.
- Overwrite Draw() in a subclass to get specific drawing behavior.
- Overwrite Move() in a subclass to get specific movement behavior.
The framework is available for download at this GitHub repository.
Lecture slides are also available for download. Please note the lecture is enhanced, not driven by the slides. Most slides provide a graphical representation of what is being discussed, not the actual material. Regardless, you may view a PDF if you like.
Written for Whitworth University for use in introductory programming courses.