3

This tutorial states the following regarding the SOIL library:

Although SOIL includes functions to automatically create a texture from an image, it uses features that aren't available in modern OpenGL. Because of this we'll simply use SOIL as image loader and create the texture ourselves.

That's OK, but what functionality? And what other functions from the library are similarly affected? I have had a google but not turned up any info on this. I have seen it used in opengl es apps also which IIRC only has the core opengl functionality.

Can anyone here shine any light on whether all functions are suspect or if it is just load_ogl_texture.

Christian Rau
  • 45,360
  • 10
  • 108
  • 185
Baggers
  • 3,183
  • 20
  • 31

1 Answers1

6

I'm pretty sure the problem is calling 'glGetString(GL_EXTENSIONS)' which has been deprecated in OpenGL 3.0 and removed in core profile 3.1. The correct approach is to (From OpenGL Forum):

GLint n, i;
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
for (i = 0; i < n; i++) {
    printf("%s\n", glGetStringi(GL_EXTENSIONS, i);
}
Mortennobel
  • 3,383
  • 4
  • 29
  • 46
  • Nice one, thanks for finding that and the suggested fix. Looks like something for me to do in my spare time! – Baggers Jul 29 '13 at 14:17