adam4813/Sigma — pull request #44 by catageek (2013-10-20 21:40:25+00:00)
Title: Fix segmentation fault in SOIL : Add SOIL sources and remove static library

This PR is to fix an issue causing a segmentation fault while loading textures with SOIL.

SOIL is statically linked with an old version of GLEW.

As stated [here](http://www.opengl.org/wiki/OpenGL_Loading_Library), Glew has a problem with glGetString() on some versions of OpenGL implementations and returns NULL, triggering a segmentation fault. The Glew library included in SOIL has this problem, and the experimental mode does not prevent the problem. SOIL library can not be fixed, naturally.

To fix this issue, SOIL was included in source to be compiled with Sigma and linking Glew dynamically. Moreover, the method calling glGetString() to load extensions has been modified to prevent using the NULL pointer. This is a poor workaround, but it allows to load the textures on video cards that have some compatibility issues.

This was tested successfully on Linux Gentoo with GLEW 1.10.0.