mirror of
https://github.com/SFML/SFML.git
synced 2025-01-19 15:55:13 +08:00
Moved glClientActiveTexture and glActiveTexture calls before glEnable(GL_TEXTURE_2D) to make sure texture unit 0 gets affected. (#523)
This commit is contained in:
parent
ff869777a9
commit
1dae89a8e0
@ -351,6 +351,13 @@ void RenderTarget::resetGLStates()
|
|||||||
// Make sure that extensions are initialized
|
// Make sure that extensions are initialized
|
||||||
priv::ensureExtensionsInit();
|
priv::ensureExtensionsInit();
|
||||||
|
|
||||||
|
// Make sure that the texture unit which is active is the number 0
|
||||||
|
if (GLEXT_multitexture)
|
||||||
|
{
|
||||||
|
glCheck(GLEXT_glClientActiveTexture(GLEXT_GL_TEXTURE0));
|
||||||
|
glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0));
|
||||||
|
}
|
||||||
|
|
||||||
// Define the default OpenGL states
|
// Define the default OpenGL states
|
||||||
glCheck(glDisable(GL_CULL_FACE));
|
glCheck(glDisable(GL_CULL_FACE));
|
||||||
glCheck(glDisable(GL_LIGHTING));
|
glCheck(glDisable(GL_LIGHTING));
|
||||||
@ -371,13 +378,6 @@ void RenderTarget::resetGLStates()
|
|||||||
if (shaderAvailable)
|
if (shaderAvailable)
|
||||||
applyShader(NULL);
|
applyShader(NULL);
|
||||||
|
|
||||||
// Make sure that the texture unit which is active is the number 0
|
|
||||||
if (GLEXT_multitexture)
|
|
||||||
{
|
|
||||||
glCheck(GLEXT_glClientActiveTexture(GLEXT_GL_TEXTURE0));
|
|
||||||
glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_cache.useVertexCache = false;
|
m_cache.useVertexCache = false;
|
||||||
|
|
||||||
// Set the default view
|
// Set the default view
|
||||||
|
Loading…
Reference in New Issue
Block a user