Minimal OpenGL 3.3 core profile demo
Switch branches/tags
Nothing to show
Clone or download

OpenGL 3.3 Core Profile Demo

This is a demo showing a minimal, portable OpenGL 3.3 Core Profile setup. The OpenGL functions are loaded with gl3w and the context is created using GLFW. Linux, Windows, OS X, and the BSDs are supported.

Read more: Minimal OpenGL 3.3 Core Profile Demo


You'll need GLFW. On any Debian-based system:

# apt-get install libglfw3-dev

If your GPU doesn't support OpenGL 3.3 and you're using Mesa 10.0+, you can force software rendering with the environment variable LIBGL_ALWAYS_SOFTWARE=1. The Makefile has a run-on-mesa target to set this for you.


The Windows build requires the wonderful MinGW-w64, and will be statically compiled against GLFW to create a fully standalone application. Build using make -f Makefile.mingw.


# brew install glfw3

Build the application using make -f Makefile.osx.


A good alternative to gl3w would be glLoadGen, which could almost be dropped directly in-place. GLEW is both much larger and does not support core profile or 3.2+ in general, so it's not an option for modern OpenGL.

A reasonable alternative to GLFW is SDL 2.0, which is bigger and brings along a lot more functionality, such as audio, threading, and font rendering, should you need it.