1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0025758: Visualization, TKOpenGl - texture initialization fails on Intel HD 4600 in ray tracing test

Unbind global texture sampler right after its usage.
This commit is contained in:
kgv
2015-01-29 15:16:09 +03:00
committed by bugmaster
parent 1e99558fbd
commit e3414ada99
2 changed files with 6 additions and 23 deletions

View File

@@ -292,6 +292,12 @@ Handle(OpenGl_Texture) OpenGl_Workspace::DisableTexture()
return myTextureBound;
}
const Handle(OpenGl_Sampler)& aSampler = myGlContext->TextureSampler();
if (!aSampler.IsNull())
{
aSampler->Unbind (*myGlContext);
}
#if !defined(GL_ES_VERSION_2_0)
// reset texture matrix because some code may expect it is identity
GLint aMatrixMode = GL_TEXTURE;