Code Snippets

Here you will find some useful code snippets and small demos.

Opengl 3D Textures

This is a small example that shows how you can use 3D textures for voxel rendering.

Download



Recursive Planar Reflection

This example shows recursive reflections in OpenGL using the stencil buffer.

Download



Creating Cube Maps

A small code snippets showing how to create cubemaps in OpenGL.

Download



Render To Texture

Code that shows how to create reflections by rendering to a texture instead of using the stencil buffer.

Download



Playing OGG and WAV files using OpenAL

An example that shows how to load and play *.wav and *.ogg files using OpenAL and Ogg Vorbis

Download



Projective Texture Mapping

Shows how to enable projective textures in OpenGL.

Download