Mariusz Bartosik's website

Graphics programming, demoscene and book reviews

OpenGL Initialization in Windows

OpenGL 4.x Initialization in Windows without a Framework

If you want to open an OpenGL window, most of tutorials and books will tell you to use GLFW, FreeGLUT or SDL framework. Just call glfwInit(), glfwCreateWindow() and you are done. However, if you need to write a size-limited executable or simply don’t want to create another dependency, you have to take care of this by yourself. This is how to do it “the hard way”.

Demo engine building blocks

Anatomy of a Demo Framework

It’s time to look inside the main executable file, and plan what we want to put there. The architecture of a demo framework is a bit similar to a game engine one. In fact, there are demos created with tools like Unity 3D.