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.

有帮助吗?

解决方案

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);
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top