GL3: Remove dead code

--HG--
branch : opengl3
hg/feature/opengl3
kaetemi 11 years ago
parent 9cf5b3305c
commit d421f34c1a

@ -234,7 +234,6 @@ CDriverGL3::CDriverGL3()
uint i;
_CurrentGlNormalize= false;
_ForceNormalize= false;
_AGPVertexArrayRange= NULL;
@ -388,19 +387,18 @@ bool CDriverGL3::setupDisplay()
// Init OpenGL/Driver defaults.
//=============================
glViewport(0,0,_CurrentMode.Width,_CurrentMode.Height);
glDisable(GL_AUTO_NORMAL);
glDisable(GL_COLOR_MATERIAL);
//glDisable(GL_AUTO_NORMAL); // FIXME GL3
//glDisable(GL_COLOR_MATERIAL); // FIXME GL3
glEnable(GL_DITHER);
glDisable(GL_FOG);
//glDisable(GL_FOG);
glDisable(GL_LINE_SMOOTH);
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glEnable(GL_DEPTH_TEST);
glDisable(GL_NORMALIZE);
glDisable(GL_COLOR_SUM_EXT);
//glDisable(GL_NORMALIZE);
//glDisable(GL_COLOR_SUM_EXT); // FIXME GL3
_CurrViewport.init(0.f, 0.f, 1.f, 1.f);
_CurrScissor.initFullScreen();
_CurrentGlNormalize = false;
_ForceNormalize = false;
// Setup defaults for blend, lighting ...
_DriverGLStates.forceDefaults(inlGetNumTextStages());

@ -405,8 +405,9 @@ public:
{
_ForceNormalize= normalize;
// if ForceNormalize, must enable GLNormalize now.
if (normalize)
enableGlNormalize(true);
//if (normalize)
// enableGlNormalize(true);
// FIXME GL3 FORCE NORMALIZE NOT IMPLEMENTED (VP STATE GL_NORMALIZE)
}
virtual bool isForceNormalize() const
@ -938,8 +939,6 @@ private:
// @}
bool _CurrentGlNormalize;
private:
bool createContext();
bool setupDisplay();
@ -1136,19 +1135,6 @@ private:
/// setup GL arrays, with a vb info.
void setupGlArrays(CVertexBufferInfo &vb);
/// Test/activate normalisation of normal.
void enableGlNormalize(bool normalize)
{
if (_CurrentGlNormalize!=normalize)
{
_CurrentGlNormalize= normalize;
if (normalize)
glEnable(GL_NORMALIZE);
else
glDisable(GL_NORMALIZE);
}
}
void setLightInternal(uint8 num, const CLight& light);
void enableLightInternal(uint8 num, bool enable);
void setupLightMapDynamicLighting(bool enable);

@ -423,13 +423,14 @@ bool CDriverGL3::setupMaterial(CMaterial& mat)
// Alpha Test Part.
//=================
uint32 alphaTest = mat.getFlags() & IDRV_MAT_ALPHA_TEST;
/*uint32 alphaTest = mat.getFlags() & IDRV_MAT_ALPHA_TEST;
_DriverGLStates.enableAlphaTest(alphaTest);
if (alphaTest)
{
// setup alphaTest threshold.
_DriverGLStates.alphaFunc(mat.getAlphaTestThreshold());
}
// GL3 PART OF MATERIAL PARAMETERS
}*/
// Bind ZBuffer Part.
//===================

@ -62,15 +62,12 @@ void CDriverGLStates3::forceDefaults(uint nbStages)
// Enable / disable.
_CurBlend = false;
_CurCullFace = true;
_CurAlphaTest = false;
_CurZWrite = true;
_CurStencilTest =false;
// setup GLStates.
glDisable(GL_FOG);
glDisable(GL_BLEND);
glEnable(GL_CULL_FACE);
glDisable(GL_ALPHA_TEST);
glDepthMask(GL_TRUE);
// Func.
@ -84,7 +81,6 @@ void CDriverGLStates3::forceDefaults(uint nbStages)
_CurStencilOpZFail = GL_KEEP;
_CurStencilOpZPass = GL_KEEP;
_CurStencilWriteMask = std::numeric_limits<GLuint>::max();
_CurAlphaTestThreshold = 0.5f;
// setup GLStates.
glBlendFunc(_CurBlendSrc, _CurBlendDst);
@ -164,31 +160,6 @@ void CDriverGLStates3::enableCullFace(uint enable)
}
}
// ***************************************************************************
void CDriverGLStates3::enableAlphaTest(uint enable)
{
H_AUTO_OGL(CDriverGLStates3_enableAlphaTest)
// If different from current setup, update.
bool enabled= (enable!=0);
#ifndef NL3D_GLSTATE_DISABLE_CACHE
if (enabled != _CurAlphaTest)
#endif
{
// new state.
_CurAlphaTest= enabled;
// Setup GLState.
if (_CurAlphaTest)
{
glEnable(GL_ALPHA_TEST);
}
else
{
glDisable(GL_ALPHA_TEST);
}
}
}
// ***************************************************************************
void CDriverGLStates3::enableZWrite(uint enable)
{
@ -263,21 +234,6 @@ void CDriverGLStates3::depthFunc(GLenum zcomp)
}
}
// ***************************************************************************
void CDriverGLStates3::alphaFunc(float threshold)
{
H_AUTO_OGL(CDriverGLStates3_alphaFunc)
#ifndef NL3D_GLSTATE_DISABLE_CACHE
if (threshold != _CurAlphaTestThreshold)
#endif
{
// new state
_CurAlphaTestThreshold= threshold;
}
}
// ***************************************************************************
void CDriverGLStates3::stencilFunc(GLenum func, GLint ref, GLuint mask)
{

@ -84,7 +84,6 @@ public:
void enableBlend(uint enable);
void enableCullFace(uint enable);
/// enable and set good AlphaFunc.
void enableAlphaTest(uint enable);
void enableZWrite(uint enable);
/// enable/disable stencil test
void enableStencilTest(bool enable);
@ -95,8 +94,6 @@ public:
void blendFunc(GLenum src, GLenum dst);
/// glDepthFunc.
void depthFunc(GLenum zcomp);
/// glAlphaFunc
void alphaFunc(float threshold);
/// glStencilFunc
void stencilFunc(GLenum stencilFunc, GLint ref, GLuint mask);
/// glStencilOp
@ -143,7 +140,6 @@ public:
private:
bool _CurBlend;
bool _CurCullFace;
bool _CurAlphaTest;
bool _CurZWrite;
bool _CurStencilTest;
@ -157,7 +153,6 @@ private:
GLenum _CurStencilOpZFail;
GLenum _CurStencilOpZPass;
GLuint _CurStencilWriteMask;
float _CurAlphaTestThreshold;
uint _CurrentActiveTexture;

Loading…
Cancel
Save