LWJGL::www.sjonesart.com/gl.php

I wrote/am writing these tutorials as I work up a game engine I can use to code a game idea. I am thinking it is better to spend the effort at the outset and get an engine I understand rather than face the trials of someone else's engine throughout the game writing exercise... probably deluded, but there you go. Most of these tutorials have already found there way onto the LWJGL site. It is easier to manage updates and links from this website.


01: Setting up LWJGL in NetBeans 6.91

Configuring environments is a pain. Hope this helps.

02: Porting Blender 2.5 Data to LWJGL

I wrote a tutorial porting data from Blender 2.5 and reading the data into LWJGL. I have since re-written the Blender script to include exporting tangents and bitangents. The new Blender script and the Java code for reading the script is in the JOGL section tutorial 03 VBOs. It is written using JOGL but it would be easy enough to convert the StaticMeshData class to work with LWJGL (or indeed, SDL, GLUT or any NeHe type environments), I just haven't done it. This class is the only one needed to read the data and provide it to the LWJGL state.

03: Setting up Shaders

The tutorial can be found here. Quite apart from writing shaders, there is the black art of getting them to run on the GPU. This tutorial sets up simple vertex and fragment shaders using LWJGL. Code is here

04: Setting a Models Position in the Shader

The tutorial can be found here. A stationary model is still located somewhere in the game world. Its position is usually given it via calls to translate/rotate, which same calls are made every game loop. This tutorial moves the calculations off the CPU and onto the GPU. If nothing else user defined uniform variables are passed to the vertex shader. To explain the calculations used in the shader, however, a version of the program calculating the required matrices on the CPU side is examined. The code for it can be found here. The code utilizing the vertex shader to position the model is found here

05: Multi-texturing

The tutorial can be found here. If you want to use a normal map, environment map, specular map, etc, as well as the color texture map when shading a model you will need to know how to pass multiple textures into your shader programs. That is what this tutorial is all about. The code for it can be found here

06: FPS Using Matrix Calculation

The tutorial can be found here. This tutorial builds a first person shooter camera by calculating the modelView matrix and then loading it into gl each loop. The full code can be found here