mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0032105: Visualization, TKOpenGl - PBR flat shading GLSL program compilation error on OpenGL ES 2.0
OpenGl_ShaderManager::defaultGlslVersion() - fixed combining two extensions in header.
This commit is contained in:
parent
e1d17cebe2
commit
8df3104cd2
@ -1764,6 +1764,7 @@ int OpenGl_ShaderManager::defaultGlslVersion (const Handle(Graphic3d_ShaderProgr
|
||||
}
|
||||
else
|
||||
{
|
||||
TCollection_AsciiString aGles2Extensions;
|
||||
if (theProgram->IsPBR())
|
||||
{
|
||||
if (myContext->IsGlGreaterEqual (3, 0))
|
||||
@ -1772,8 +1773,8 @@ int OpenGl_ShaderManager::defaultGlslVersion (const Handle(Graphic3d_ShaderProgr
|
||||
}
|
||||
else if (myContext->CheckExtension ("GL_EXT_shader_texture_lod"))
|
||||
{
|
||||
theProgram->SetHeader ("#extension GL_EXT_shader_texture_lod : enable\n"
|
||||
"#define textureCubeLod textureCubeLodEXT");
|
||||
aGles2Extensions += "#extension GL_EXT_shader_texture_lod : enable\n"
|
||||
"#define textureCubeLod textureCubeLodEXT\n";
|
||||
}
|
||||
}
|
||||
if ((theBits & OpenGl_PO_WriteOit) != 0
|
||||
@ -1802,9 +1803,14 @@ int OpenGl_ShaderManager::defaultGlslVersion (const Handle(Graphic3d_ShaderProgr
|
||||
}
|
||||
else if (myContext->oesStdDerivatives)
|
||||
{
|
||||
theProgram->SetHeader ("#extension GL_OES_standard_derivatives : enable");
|
||||
aGles2Extensions += "#extension GL_OES_standard_derivatives : enable\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!aGles2Extensions.IsEmpty())
|
||||
{
|
||||
theProgram->SetHeader (aGles2Extensions);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user