A poster, JakobProgsch, over on the TigSource forums has made a series of OpenGL samples
available on GitHub. Each example is contained in a single file, doesn’t depend on any non-canonical libraries or hide code behind a framework. As a results the examples are a bit longer, but easier to follow.
The following topics are covered ( description taken from each file header ).
Sample 1
Skeleton code that all the other examples are based on
Sample 2
This example shows the setup and usage of shaders and a vbo+vao
Sample 3
This example shows the setup and usage of shaders and a vbo+vao
In this example the attrbute locations are set via BindAttribLocation
instead of layout qualifiers in the shaders
Sample 4
same as the "Shader and VBO" example, only with an indexed vbo.
Sample 5
apply a texture to the fullscreen quad of "Indexed VBO"
Sample 6
set up a perspective projection and render a rotating cube
Sample 7
render the cube from the perspective example to a texture and
apply fxaa antialiasing to it.
Sample 8
create 8 instances of the cube from the perspective example
with an additional offset buffer and AttribDivisor
Sample 9
create 8 instances of the cube from the perspective example
the difference to the instancing1 example is that we are
using a texture buffer for the per instance data instead of a
vertex buffer with divisor.
Sample 10
create 8 instances of the cube from the perspective example
the per instance data is passed with a uniform buffer object
Sample 11
Uses a geometry shader to expand points to billboard quads.
The billboards are then blended while drawing to create a galaxy
made of particles.
Sample 12
This example uses the geometry shader again for particle drawing.
The particles are animated on the cpu and uploaded every frame by
mapping vbos. Multiple vbos are used to triple buffer the particle
data.
Sample 13
This example simulates the same particle system as the buffer mapping
example. Instead of updating particles on the cpu and uploading
the update is done on the gpu with transform feedback.
Sample 14
This example renders a "voxel landscape/cave" from the view of a
moveable camera. Occlusion queries and conditional rendering are used
to cull occluded parts of the world and timer queries are used
to measure the performance.
Hope he keeps them coming, good OpenGL resources are scarce.
Edit: 7/5/2012 Fixed links and added 14th sample, which by the way, is a bit of a monster.
97875083-079d-4ae7-bf15-6177ba816206|2|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Programming
Tutorial, CPP, Programming