More fixed functionality pipeline disabled with conditional build.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 997a231bff
commit 0ab6322955

@ -1014,6 +1014,7 @@ private:
{ {
static const float OO255= 1.0f/255; static const float OO255= 1.0f/255;
_CurrentTexEnv[stage].ConstantColor= col; _CurrentTexEnv[stage].ConstantColor= col;
#ifndef GLSL
// Setup the gl cte color. // Setup the gl cte color.
_DriverGLStates.activeTextureARB(stage); _DriverGLStates.activeTextureARB(stage);
GLfloat glcol[4]; GLfloat glcol[4];
@ -1022,6 +1023,7 @@ private:
glcol[2]= col.B*OO255; glcol[2]= col.B*OO255;
glcol[3]= col.A*OO255; glcol[3]= col.A*OO255;
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, glcol); glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, glcol);
#endif
} }
void forceActivateTexEnvColor(uint stage, const CMaterial::CTexEnv &env) void forceActivateTexEnvColor(uint stage, const CMaterial::CTexEnv &env)
{ {

@ -69,6 +69,7 @@ void CDriverGL3::setLightInternal(uint8 num, const CLight& light)
// Copy the mode // Copy the mode
_LightMode[num]=mode; _LightMode[num]=mode;
#ifndef GLSL
// Set the ambiant color // Set the ambiant color
GLfloat colorGL[4]; GLfloat colorGL[4];
CRGBA colorNeL=light.getAmbiant (); CRGBA colorNeL=light.getAmbiant ();
@ -111,6 +112,8 @@ void CDriverGL3::setLightInternal(uint8 num, const CLight& light)
glLightf (lightNum, GL_LINEAR_ATTENUATION, light.getLinearAttenuation()); glLightf (lightNum, GL_LINEAR_ATTENUATION, light.getLinearAttenuation());
glLightf (lightNum, GL_QUADRATIC_ATTENUATION, light.getQuadraticAttenuation()); glLightf (lightNum, GL_QUADRATIC_ATTENUATION, light.getQuadraticAttenuation());
#endif
// Set the position // Set the position
if ((mode==CLight::DirectionalLight)||(mode==CLight::SpotLight)) if ((mode==CLight::DirectionalLight)||(mode==CLight::SpotLight))
{ {
@ -129,20 +132,27 @@ void CDriverGL3::setLightInternal(uint8 num, const CLight& light)
// Get the exponent of the spot // Get the exponent of the spot
float exponent=light.getExponent (); float exponent=light.getExponent ();
#ifndef GLSL
// Set it // Set it
glLightf (lightNum, GL_SPOT_EXPONENT, exponent); glLightf (lightNum, GL_SPOT_EXPONENT, exponent);
#endif
// Get the cutoff of the spot // Get the cutoff of the spot
float cutoff=180.f*(light.getCutoff ()/(float)NLMISC::Pi); float cutoff=180.f*(light.getCutoff ()/(float)NLMISC::Pi);
#ifndef GLSL
// Set it // Set it
glLightf (lightNum, GL_SPOT_CUTOFF, cutoff); glLightf (lightNum, GL_SPOT_CUTOFF, cutoff);
#endif
} }
else else
{ {
#ifndef GLSL
// Disable spot properties // Disable spot properties
glLighti (lightNum, GL_SPOT_CUTOFF, 180); glLighti (lightNum, GL_SPOT_CUTOFF, 180);
glLighti (lightNum, GL_SPOT_EXPONENT, 0); glLighti (lightNum, GL_SPOT_EXPONENT, 0);
#endif
} }
// Flag this light as dirt. // Flag this light as dirt.
@ -199,6 +209,8 @@ void CDriverGL3::enableLightInternal(uint8 num, bool enable)
void CDriverGL3::setAmbientColor (CRGBA color) void CDriverGL3::setAmbientColor (CRGBA color)
{ {
H_AUTO_OGL(CDriverGL3_setAmbientColor ) H_AUTO_OGL(CDriverGL3_setAmbientColor )
#ifndef GLSL
// Gl array // Gl array
GLfloat array[4]; GLfloat array[4];
array[0]=(float)color.R/255.f; array[0]=(float)color.R/255.f;
@ -208,6 +220,8 @@ void CDriverGL3::setAmbientColor (CRGBA color)
// Set the color // Set the color
glLightModelfv (GL_LIGHT_MODEL_AMBIENT, array); glLightModelfv (GL_LIGHT_MODEL_AMBIENT, array);
#endif
} }
@ -218,6 +232,8 @@ void CDriverGL3::cleanLightSetup ()
// Should be dirty // Should be dirty
nlassert (_LightSetupDirty); nlassert (_LightSetupDirty);
#ifndef GLSL
// First light // First light
bool first=true; bool first=true;
@ -296,6 +312,8 @@ void CDriverGL3::cleanLightSetup ()
if (!first) if (!first)
glPopMatrix (); glPopMatrix ();
#endif
// Clean flag // Clean flag
_LightSetupDirty=false; _LightSetupDirty=false;
} }

@ -828,6 +828,7 @@ void CDriverGL3::setupLightMapPass(uint pass)
// TexEnv is special. // TexEnv is special.
_CurrentTexEnvSpecial[stage] = TexEnvSpecialLightMap; _CurrentTexEnvSpecial[stage] = TexEnvSpecialLightMap;
#ifndef GLSL
{ {
// ATI EnvCombine3 // ATI EnvCombine3
// What we want to setup is Texture*Constant + Previous. // What we want to setup is Texture*Constant + Previous.
@ -845,6 +846,7 @@ void CDriverGL3::setupLightMapPass(uint pass)
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT ); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT );
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);
} }
#endif
} }
} }
@ -982,7 +984,9 @@ void CDriverGL3::endLightMapMultiPass()
// If multi-pass, then must reset the fog color // If multi-pass, then must reset the fog color
if(_NLightMapPass>=2 && _FogEnabled) if(_NLightMapPass>=2 && _FogEnabled)
{ {
#ifndef GLSL
glFogfv(GL_FOG_COLOR, _CurrentFogColor); glFogfv(GL_FOG_COLOR, _CurrentFogColor);
#endif
} }
// nothing to do with blending/lighting, since always setuped in activeMaterial(). // nothing to do with blending/lighting, since always setuped in activeMaterial().
@ -992,11 +996,13 @@ void CDriverGL3::endLightMapMultiPass()
// Clean up all stage for Multiply x 2 // Clean up all stage for Multiply x 2
if (_CurrentMaterial->_LightMapsMulx2) if (_CurrentMaterial->_LightMapsMulx2)
{ {
#ifndef GLSL
for (uint32 i = 0; i < (_NLightMapPerPass+1); ++i) for (uint32 i = 0; i < (_NLightMapPerPass+1); ++i)
{ {
_DriverGLStates.activeTextureARB(i); _DriverGLStates.activeTextureARB(i);
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1); glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1);
} }
#endif
} }
} }

@ -166,9 +166,11 @@ void CDriverGL3::doRefreshRenderSetup()
if( _ProjMatDirty ) if( _ProjMatDirty )
{ {
#ifndef GLSL
glMatrixMode( GL_PROJECTION ); glMatrixMode( GL_PROJECTION );
glLoadMatrixf( _GLProjMat.get() ); glLoadMatrixf( _GLProjMat.get() );
glMatrixMode( GL_MODELVIEW ); glMatrixMode( GL_MODELVIEW );
#endif
_ProjMatDirty = false; _ProjMatDirty = false;
} }
@ -176,11 +178,13 @@ void CDriverGL3::doRefreshRenderSetup()
// Check if must update the modelViewMatrix // Check if must update the modelViewMatrix
if( _ModelViewMatrixDirty ) if( _ModelViewMatrixDirty )
{ {
#ifndef GLSL
// By default, the first model matrix is active // By default, the first model matrix is active
glLoadMatrixf( _ModelViewMatrix.get() ); glLoadMatrixf( _ModelViewMatrix.get() );
// enable normalize if matrix has scale. // enable normalize if matrix has scale.
enableGlNormalize( _ModelViewMatrix.hasScalePart() || _ForceNormalize ); enableGlNormalize( _ModelViewMatrix.hasScalePart() || _ForceNormalize );
// clear. // clear.
#endif
_ModelViewMatrixDirty= false; _ModelViewMatrixDirty= false;
} }
@ -190,6 +194,7 @@ void CDriverGL3::doRefreshRenderSetup()
void CDriverGL3::refreshTexMatrices() void CDriverGL3::refreshTexMatrices()
{ {
#ifndef GLSL
glMatrixMode( GL_TEXTURE ); glMatrixMode( GL_TEXTURE );
for( int i = 0; i < IDRV_MAT_MAXTEXTURES; i++ ) for( int i = 0; i < IDRV_MAT_MAXTEXTURES; i++ )
{ {
@ -201,6 +206,7 @@ void CDriverGL3::refreshTexMatrices()
} }
} }
glMatrixMode( GL_MODELVIEW ); glMatrixMode( GL_MODELVIEW );
#endif
} }
#ifdef NL_STATIC #ifdef NL_STATIC

@ -299,10 +299,12 @@ void CDriverGLStates3::enableLight(uint num, uint enable)
// new state. // new state.
_CurLight[num]= enabled; _CurLight[num]= enabled;
// Setup GLState. // Setup GLState.
#ifndef GLSL
if(_CurLight[num]) if(_CurLight[num])
glEnable ((GLenum)(GL_LIGHT0+num)); glEnable ((GLenum)(GL_LIGHT0+num));
else else
glDisable ((GLenum)(GL_LIGHT0+num)); glDisable ((GLenum)(GL_LIGHT0+num));
#endif
} }
} }
@ -424,7 +426,9 @@ void CDriverGLStates3::alphaFunc(float threshold)
// new state // new state
_CurAlphaTestThreshold= threshold; _CurAlphaTestThreshold= threshold;
// setup function. // setup function.
#ifndef GLSL
glAlphaFunc(GL_GREATER, _CurAlphaTestThreshold); glAlphaFunc(GL_GREATER, _CurAlphaTestThreshold);
#endif
} }
} }
@ -492,7 +496,9 @@ void CDriverGLStates3::setEmissive(uint32 packedColor, const GLfloat color[4])
#endif #endif
{ {
_CurEmissive= packedColor; _CurEmissive= packedColor;
#ifndef GLSL
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, color); glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, color);
#endif
} }
} }
@ -505,7 +511,9 @@ void CDriverGLStates3::setAmbient(uint32 packedColor, const GLfloat color[4])
#endif #endif
{ {
_CurAmbient= packedColor; _CurAmbient= packedColor;
#ifndef GLSL
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, color); glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, color);
#endif
} }
} }
@ -518,7 +526,9 @@ void CDriverGLStates3::setDiffuse(uint32 packedColor, const GLfloat color[4])
#endif #endif
{ {
_CurDiffuse= packedColor; _CurDiffuse= packedColor;
#ifndef GLSL
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, color); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, color);
#endif
} }
} }
@ -531,7 +541,9 @@ void CDriverGLStates3::setSpecular(uint32 packedColor, const GLfloat color[4])
#endif #endif
{ {
_CurSpecular= packedColor; _CurSpecular= packedColor;
#ifndef GLSL
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color);
#endif
} }
} }
@ -544,7 +556,9 @@ void CDriverGLStates3::setShininess(float shin)
#endif #endif
{ {
_CurShininess= shin; _CurShininess= shin;
#ifndef GLSL
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, shin); glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, shin);
#endif
} }
} }
@ -570,6 +584,8 @@ void CDriverGLStates3::setVertexColorLighted(bool enable)
{ {
_VertexColorLighted= enable; _VertexColorLighted= enable;
#ifndef GLSL
if (_VertexColorLighted) if (_VertexColorLighted)
{ {
glEnable (GL_COLOR_MATERIAL); glEnable (GL_COLOR_MATERIAL);
@ -588,6 +604,8 @@ void CDriverGLStates3::setVertexColorLighted(bool enable)
convColor(diffCol, glColor); convColor(diffCol, glColor);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, glColor); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, glColor);
} }
#endif
} }
} }
@ -643,6 +661,8 @@ void CDriverGLStates3::setTexGenMode (uint stage, GLint mode)
{ {
_TexGenMode[stage] = mode; _TexGenMode[stage] = mode;
#ifndef GLSL
if (!_TextureCubeMapSupported) return; if (!_TextureCubeMapSupported) return;
if(mode==0) if(mode==0)
@ -680,6 +700,8 @@ void CDriverGLStates3::setTexGenMode (uint stage, GLint mode)
glEnable( GL_TEXTURE_GEN_T ); glEnable( GL_TEXTURE_GEN_T );
glEnable( GL_TEXTURE_GEN_R ); glEnable( GL_TEXTURE_GEN_R );
} }
#endif
} }
} }
@ -688,6 +710,8 @@ void CDriverGLStates3::resetTextureMode()
{ {
H_AUTO_OGL(CDriverGLStates3_resetTextureMode); H_AUTO_OGL(CDriverGLStates3_resetTextureMode);
#ifndef GLSL
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
if (_TextureCubeMapSupported) if (_TextureCubeMapSupported)
@ -700,6 +724,8 @@ void CDriverGLStates3::resetTextureMode()
glDisable(GL_TEXTURE_RECTANGLE_NV); glDisable(GL_TEXTURE_RECTANGLE_NV);
} }
#endif
_TextureMode[_CurrentActiveTextureARB]= TextureDisabled; _TextureMode[_CurrentActiveTextureARB]= TextureDisabled;
} }
@ -711,6 +737,9 @@ void CDriverGLStates3::setTextureMode(TTextureMode texMode)
TTextureMode oldTexMode = _TextureMode[_CurrentActiveTextureARB]; TTextureMode oldTexMode = _TextureMode[_CurrentActiveTextureARB];
if(oldTexMode != texMode) if(oldTexMode != texMode)
{ {
#ifndef GLSL
// Disable first old mode. // Disable first old mode.
if (oldTexMode == Texture2D) if (oldTexMode == Texture2D)
{ {
@ -767,6 +796,8 @@ void CDriverGLStates3::setTextureMode(TTextureMode texMode)
} }
} }
#endif
// new mode. // new mode.
_TextureMode[_CurrentActiveTextureARB]= texMode; _TextureMode[_CurrentActiveTextureARB]= texMode;
} }
@ -799,6 +830,8 @@ void CDriverGLStates3::forceActiveTextureARB(uint stage)
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableVertexArray(bool enable) void CDriverGLStates3::enableVertexArray(bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableVertexArray); H_AUTO_OGL(CDriverGLStates3_enableVertexArray);
if(_VertexArrayEnabled != enable) if(_VertexArrayEnabled != enable)
@ -810,10 +843,15 @@ void CDriverGLStates3::enableVertexArray(bool enable)
_VertexArrayEnabled= enable; _VertexArrayEnabled= enable;
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableNormalArray(bool enable) void CDriverGLStates3::enableNormalArray(bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableNormalArray) H_AUTO_OGL(CDriverGLStates3_enableNormalArray)
if(_NormalArrayEnabled != enable) if(_NormalArrayEnabled != enable)
{ {
@ -825,10 +863,14 @@ void CDriverGLStates3::enableNormalArray(bool enable)
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableWeightArray(bool enable) void CDriverGLStates3::enableWeightArray(bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableWeightArray); H_AUTO_OGL(CDriverGLStates3_enableWeightArray);
if(_WeightArrayEnabled != enable) if(_WeightArrayEnabled != enable)
@ -840,10 +882,13 @@ void CDriverGLStates3::enableWeightArray(bool enable)
_WeightArrayEnabled= enable; _WeightArrayEnabled= enable;
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableColorArray(bool enable) void CDriverGLStates3::enableColorArray(bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableColorArray); H_AUTO_OGL(CDriverGLStates3_enableColorArray);
if(_ColorArrayEnabled != enable) if(_ColorArrayEnabled != enable)
@ -856,12 +901,15 @@ void CDriverGLStates3::enableColorArray(bool enable)
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableSecondaryColorArray(bool enable) void CDriverGLStates3::enableSecondaryColorArray(bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableSecondaryColorArray); H_AUTO_OGL(CDriverGLStates3_enableSecondaryColorArray);
if(_SecondaryColorArrayEnabled != enable) if(_SecondaryColorArrayEnabled != enable)
@ -880,11 +928,14 @@ void CDriverGLStates3::enableSecondaryColorArray(bool enable)
nglSecondaryColor3ubEXT(0,0,0); nglSecondaryColor3ubEXT(0,0,0);
} }
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::clientActiveTextureARB(uint stage) void CDriverGLStates3::clientActiveTextureARB(uint stage)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_clientActiveTextureARB); H_AUTO_OGL(CDriverGLStates3_clientActiveTextureARB);
if( _CurrentClientActiveTextureARB != stage ) if( _CurrentClientActiveTextureARB != stage )
@ -892,11 +943,14 @@ void CDriverGLStates3::clientActiveTextureARB(uint stage)
nglClientActiveTextureARB(GL_TEXTURE0_ARB+stage); nglClientActiveTextureARB(GL_TEXTURE0_ARB+stage);
_CurrentClientActiveTextureARB= stage; _CurrentClientActiveTextureARB= stage;
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableTexCoordArray(bool enable) void CDriverGLStates3::enableTexCoordArray(bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableTexCoordArray); H_AUTO_OGL(CDriverGLStates3_enableTexCoordArray);
if(_TexCoordArrayEnabled[_CurrentClientActiveTextureARB] != enable) if(_TexCoordArrayEnabled[_CurrentClientActiveTextureARB] != enable)
@ -909,11 +963,14 @@ void CDriverGLStates3::enableTexCoordArray(bool enable)
_TexCoordArrayEnabled[_CurrentClientActiveTextureARB]= enable; _TexCoordArrayEnabled[_CurrentClientActiveTextureARB]= enable;
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
void CDriverGLStates3::enableVertexAttribArray(uint glIndex, bool enable) void CDriverGLStates3::enableVertexAttribArray(uint glIndex, bool enable)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGLStates3_enableVertexAttribArray); H_AUTO_OGL(CDriverGLStates3_enableVertexAttribArray);
if(_VertexAttribArrayEnabled[glIndex] != enable) if(_VertexAttribArrayEnabled[glIndex] != enable)
@ -924,6 +981,7 @@ void CDriverGLStates3::enableVertexAttribArray(uint glIndex, bool enable)
glDisableClientState(glIndex+GL_VERTEX_ATTRIB_ARRAY0_NV); glDisableClientState(glIndex+GL_VERTEX_ATTRIB_ARRAY0_NV);
_VertexAttribArrayEnabled[glIndex]= enable; _VertexAttribArrayEnabled[glIndex]= enable;
} }
#endif
} }
// *************************************************************************** // ***************************************************************************
@ -956,11 +1014,13 @@ void CDriverGLStates3::enableFog(uint enable)
{ {
// new state. // new state.
_CurFog= enabled; _CurFog= enabled;
#ifndef GLSL
// Setup GLState. // Setup GLState.
if(_CurFog) if(_CurFog)
glEnable(GL_FOG); glEnable(GL_FOG);
else else
glDisable(GL_FOG); glDisable(GL_FOG);
#endif
} }
} }

@ -1443,6 +1443,7 @@ void CDriverGL3::forceActivateTexEnvMode(uint stage, const CMaterial::CTexEnv
// Disable Special tex env f(). // Disable Special tex env f().
_CurrentTexEnvSpecial[stage]= TexEnvSpecialDisabled; _CurrentTexEnvSpecial[stage]= TexEnvSpecialDisabled;
#ifndef GLSL
// Setup the gl env mode. // Setup the gl env mode.
_DriverGLStates.activeTextureARB(stage); _DriverGLStates.activeTextureARB(stage);
@ -1562,6 +1563,8 @@ void CDriverGL3::forceActivateTexEnvMode(uint stage, const CMaterial::CTexEnv
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
} }
#endif
} }
// *************************************************************************** // ***************************************************************************

@ -804,6 +804,7 @@ const uint CDriverGL3::GLVertexAttribIndex[CVertexBuffer::NumValue]=
// *************************************************************************** // ***************************************************************************
void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb) void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb)
{ {
#ifndef GLSL
H_AUTO_OGL(CDriverGL3_setupGlArraysStd) H_AUTO_OGL(CDriverGL3_setupGlArraysStd)
uint32 flags= vb.VertexFormat; uint32 flags= vb.VertexFormat;
@ -860,6 +861,9 @@ void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb)
// normal behavior: each texture has its own UV. // normal behavior: each texture has its own UV.
setupUVPtr(i, vb, vb.UVRouting[i]); setupUVPtr(i, vb, vb.UVRouting[i]);
} }
#endif
} }
@ -870,6 +874,8 @@ void CDriverGL3::toggleGlArraysForARBVertexProgram()
// If change of setup type, must disable olds. // If change of setup type, must disable olds.
//======================= //=======================
#ifndef GLSL
// If last was a VertexProgram setup, and now it is a standard GL array setup. // If last was a VertexProgram setup, and now it is a standard GL array setup.
if( _LastSetupGLArrayVertexProgram && !isVertexProgramEnabled () ) if( _LastSetupGLArrayVertexProgram && !isVertexProgramEnabled () )
{ {
@ -929,6 +935,9 @@ void CDriverGL3::toggleGlArraysForARBVertexProgram()
// now, vertex program setup. // now, vertex program setup.
_LastSetupGLArrayVertexProgram= true; _LastSetupGLArrayVertexProgram= true;
} }
#endif
} }
// tells for each vertex argument if it must be normalized when it is an integral type // tells for each vertex argument if it must be normalized when it is an integral type
@ -1000,20 +1009,21 @@ void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb)
{ {
H_AUTO_OGL(CDriverGL3_setupGlArrays) H_AUTO_OGL(CDriverGL3_setupGlArrays)
{ #ifndef GLSL
toggleGlArraysForARBVertexProgram(); toggleGlArraysForARBVertexProgram();
// Use a vertex program ? // Use a vertex program ?
if (!isVertexProgramEnabled ()) if (!isVertexProgramEnabled ())
{ {
#ifndef GLSL
setupGlArraysStd(vb); setupGlArraysStd(vb);
#endif
} }
else else
{ {
#endif
setupGlArraysForARBVertexProgram(vb); setupGlArraysForARBVertexProgram(vb);
#ifndef GLSL
} }
} #endif
} }

Loading…
Cancel
Save