diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index c00c8aece..29e14a1a0 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -161,21 +161,12 @@ const uint CDriverGL::_EVSNumConstant = 97; GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] = { -#ifdef USE_OPENGLES - GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES -#else GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB -#endif }; // *************************************************************************** diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index a9df7c4bc..a11d0cd1c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -77,6 +77,13 @@ typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pnam #define GL_INTERPOLATE_EXT GL_INTERPOLATE #define GL_BUMP_ENVMAP_ATI GL_INTERPOLATE +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES + #else // *************************************************************************** diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index dc2a4243a..5392bcbdd 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -205,8 +205,8 @@ bool CDriverGL::activeNVVertexProgram (CVertexProgram *program) return false; } - // *************************************************************************** +#ifndef USE_OPENGLES static inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate) { @@ -216,16 +216,11 @@ inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate) { switch(comp) { -#ifdef USE_OPENGLES - case CVPSwizzle::X: return GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES; - case CVPSwizzle::Y: return GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES; - case CVPSwizzle::Z: return GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES; -#else case CVPSwizzle::X: return GL_X_EXT; case CVPSwizzle::Y: return GL_Y_EXT; case CVPSwizzle::Z: return GL_Z_EXT; case CVPSwizzle::W: return GL_W_EXT; -#endif + default: nlstop; return 0; @@ -236,16 +231,11 @@ inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate) { switch(comp) { -#ifdef USE_OPENGLES - case CVPSwizzle::X: return GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES; - case CVPSwizzle::Y: return GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES; - case CVPSwizzle::Z: return GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES; -#else case CVPSwizzle::X: return GL_NEGATIVE_X_EXT; case CVPSwizzle::Y: return GL_NEGATIVE_Y_EXT; case CVPSwizzle::Z: return GL_NEGATIVE_Z_EXT; case CVPSwizzle::W: return GL_NEGATIVE_W_EXT; -#endif + default: nlstop; return 0; @@ -253,6 +243,7 @@ inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate) } } } +#endif // *************************************************************************** /** Convert an output register to a EXTVertexShader register