Skip to content

iku000888/opengl-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Linux

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 includes 'run-on-mesa' that sets this for you.

Windows

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.

OSX

# brew install glfw3

Build the application using make -f Makefile.osx.

Alternatives

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.

About

Minimal OpenGL 3.3 core profile demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 76.3%
  • C++ 23.7%