1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0032110: Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without GL_EXT_shader_texture_lod

textureCube() is now used as fallback when textureCubeLod() is unavailable.
This commit is contained in:
kgv
2021-02-02 14:33:57 +03:00
committed by bugmaster
parent 7106e4c8b1
commit 75642c1489
4 changed files with 16 additions and 3 deletions

View File

@@ -32,7 +32,11 @@
#define occTexture2D texture2D
#define occTexture3D texture3D
#define occTextureCube textureCube
#define occTextureCubeLod textureCubeLod
#if !defined(GL_ES) || defined(textureCubeLod)
#define occTextureCubeLod textureCubeLod
#else // fallback
#define occTextureCubeLod(theSampl,theCoord,theLod) textureCube(theSampl,theCoord)
#endif
#endif
#ifdef GL_ES

View File

@@ -35,7 +35,11 @@ static const char Shaders_Declarations_glsl[] =
" #define occTexture2D texture2D\n"
" #define occTexture3D texture3D\n"
" #define occTextureCube textureCube\n"
" #define occTextureCubeLod textureCubeLod\n"
" #if !defined(GL_ES) || defined(textureCubeLod)\n"
" #define occTextureCubeLod textureCubeLod\n"
" #else // fallback\n"
" #define occTextureCubeLod(theSampl,theCoord,theLod) textureCube(theSampl,theCoord)\n"
" #endif\n"
"#endif\n"
"\n"
"#ifdef GL_ES\n"