Help end child hunger

A code sample has been uploaded with a Visual Studio 2010 project, with source code and shaders, to illustrate the process of loading an image with the DevIL API and creating a texture in OpenGL.

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.

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.

© 2014 Suffusion theme by Sayontan Sinha