Simple OpenGL Shader Example

This post provides a clean, up-to-date and concise example on how to set up a simple custom shader in OpenGL that runs out of the box. My target language is Java with LWJGL, but the code can easily be ported to different languages on this level. To my surprise, I is quite difficult to find a state of the art example of a simple yet complete setup for shaders that can serve as a get-go for more complex programs. Most OpenGL shader tutorials are written for the pre-2.0 era (ie. using shaders through ARB extensions) that is long over. This post is therefore trying to provide a modern "Hello World of Shaders" set up example. (more…)

By admin, ago