Help end child hunger
Jan 282013
 

OpenGL, unlike Direct3D, is operating system independent. While this eases the portability among different OS, it implies that we have to resort to external libraries for a number of tasks, loading images being one of the most used.

There are many libraries to load images, DevIL being one of them. It loads a large number of image formats and it is cross platform.

A short tutorial for loading an image, getting its data and attributes, and finally creating an OpenGL texture is available in here.

Apr 152011
 

This is an OpenGL 3.3 + GLSL 3.3 sample that loads and displays a 3D model with Assimp. It also uses DevIL in case the model has textures. It was based on Assimps OpenGL demo and it extends it to support OpenGL 3.3

The sample uses Texturing, Vertex Array Objects, and Uniform Blocks. Camera can move around the object using the mouse, and the mousewheel can be used to zoom on the model, courtesy of freeglut.