Schabby's Blog
Reserve Orbital Defence Commander

In this tutorial, we will discuss how to load a shader in OpenGL.


In order to get up and running with OpenGL and LWJGL, one need to understand the most basic setup of LWJGL. This is important to understand because all following examples will be based on that.


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.


In diesem post widme ich mich folgender Fragestellungen:

  • Beispiele und Erklärung der For- und ForEach Schleife
  • Was ist mit For bzw. ForEach Loop gemeint?
  • Was sind Java Laufvariablen und wie benutze ich sie?


Nov
20.

Dieser Artikel behandelt die folgenden Themen

  • Java Arrays mit Beispielen
  • Arrays in Java in mehreren Dimensionen