mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
Changed: Simplification of OpenGL ES driver
This commit is contained in:
parent
9ec8c40c65
commit
ccc51e18b8
3 changed files with 11 additions and 22 deletions
|
@ -161,21 +161,12 @@ const uint CDriverGL::_EVSNumConstant = 97;
|
||||||
|
|
||||||
GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] =
|
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_POSITIVE_X_ARB,
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,
|
||||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
|
GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
|
||||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
|
GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -77,6 +77,13 @@ typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pnam
|
||||||
#define GL_INTERPOLATE_EXT GL_INTERPOLATE
|
#define GL_INTERPOLATE_EXT GL_INTERPOLATE
|
||||||
#define GL_BUMP_ENVMAP_ATI 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
|
#else
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -205,8 +205,8 @@ bool CDriverGL::activeNVVertexProgram (CVertexProgram *program)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
#ifndef USE_OPENGLES
|
||||||
static
|
static
|
||||||
inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate)
|
inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate)
|
||||||
{
|
{
|
||||||
|
@ -216,16 +216,11 @@ inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate)
|
||||||
{
|
{
|
||||||
switch(comp)
|
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::X: return GL_X_EXT;
|
||||||
case CVPSwizzle::Y: return GL_Y_EXT;
|
case CVPSwizzle::Y: return GL_Y_EXT;
|
||||||
case CVPSwizzle::Z: return GL_Z_EXT;
|
case CVPSwizzle::Z: return GL_Z_EXT;
|
||||||
case CVPSwizzle::W: return GL_W_EXT;
|
case CVPSwizzle::W: return GL_W_EXT;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
nlstop;
|
nlstop;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -236,16 +231,11 @@ inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate)
|
||||||
{
|
{
|
||||||
switch(comp)
|
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::X: return GL_NEGATIVE_X_EXT;
|
||||||
case CVPSwizzle::Y: return GL_NEGATIVE_Y_EXT;
|
case CVPSwizzle::Y: return GL_NEGATIVE_Y_EXT;
|
||||||
case CVPSwizzle::Z: return GL_NEGATIVE_Z_EXT;
|
case CVPSwizzle::Z: return GL_NEGATIVE_Z_EXT;
|
||||||
case CVPSwizzle::W: return GL_NEGATIVE_W_EXT;
|
case CVPSwizzle::W: return GL_NEGATIVE_W_EXT;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
nlstop;
|
nlstop;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -253,6 +243,7 @@ inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/** Convert an output register to a EXTVertexShader register
|
/** Convert an output register to a EXTVertexShader register
|
||||||
|
|
Loading…
Reference in a new issue