Commit a974b4b3 authored by Martin Schultz's avatar Martin Schultz

fixed glError when objects are added in core profile

do not use generate mipmaps as texture parameter in core profile
call glGenerateMipMaps instead
parent deb2ee91
...@@ -327,7 +327,11 @@ bool Texture2D::autogenerateMipMaps() ...@@ -327,7 +327,11 @@ bool Texture2D::autogenerateMipMaps()
#ifdef GL_SGIS_generate_mipmap #ifdef GL_SGIS_generate_mipmap
if (supportsGenerateMipmap()) if (supportsGenerateMipmap())
{ {
parameter(GL_GENERATE_MIPMAP_SGIS, GL_TRUE); //parameter based mipmap generation was removed in 3.1
if( openGLVersion(3,1))
glGenerateMipmap(GL_TEXTURE_2D);
else
parameter(GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
return true; return true;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment