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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user