Changed: Simplification of OpenGL ES driver

This commit is contained in:
kervala 2012-12-06 10:48:46 +01:00
parent 9ec8c40c65
commit ccc51e18b8
3 changed files with 11 additions and 22 deletions

View file

@ -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
};
// ***************************************************************************

View file

@ -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
// ***************************************************************************

View file

@ -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