Removed some now unused methods.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent afb56ea660
commit cf6d2a88bc

@ -272,10 +272,6 @@ CDriverGL3::CDriverGL3()
_UserTexMatEnabled = 0;
// Ligtmap preca.
_LastVertexSetupIsLightMap= false;
for(i=0; i < IDRV_MAT_MAXTEXTURES; i++)
_LightMapUVMap[i]= -1;
// reserve enough space to never reallocate, nor test for reallocation.
_LightMapLUT.resize(NL3D_DRV_MAX_LIGHTMAP);
// must set replace for alpha part.

@ -435,7 +435,7 @@ public:
virtual bool activeIndexBuffer(CIndexBuffer& IB);
virtual void mapTextureStageToUV(uint stage, uint uv);
virtual void mapTextureStageToUV(uint stage, uint uv){}
virtual bool renderLines(CMaterial& mat, uint32 firstIndex, uint32 nlines);
virtual bool renderTriangles(CMaterial& Mat, uint32 firstIndex, uint32 ntris);
@ -1053,9 +1053,6 @@ private:
CVertexBufferInfo _LastVB;
CIndexBufferInfo _LastIB;
/// setup a texture stage with an UV from VB.
void setupUVPtr(uint stage, CVertexBufferInfo &VB, uint uvId);
/// Sets up the rendering parameters for the normal shader
void setupNormalPass();
@ -1077,13 +1074,6 @@ private:
// last stage env.
CMaterial::CTexEnv _LightMapLastStageEnv;
// Caching
bool _LastVertexSetupIsLightMap;
sint8 _LightMapUVMap[IDRV_MAT_MAXTEXTURES];
// restore std vertex Setup.
void resetLightMapVertexSetup();
// @}
/// \name Specular.
@ -1148,11 +1138,6 @@ private:
/// setup GL arrays, with a vb info.
void setupGlArrays(CVertexBufferInfo &vb);
/// Tools fct used by setupGLArrays
void setupGlArraysStd(CVertexBufferInfo &vb);
void setupGlArraysForARBVertexProgram(CVertexBufferInfo &vb);
void toggleGlArraysForARBVertexProgram();
/// Test/activate normalisation of normal.
void enableGlNormalize(bool normalize)
{

@ -470,10 +470,6 @@ bool CDriverGL3::setupMaterial(CMaterial& mat)
// 4. Misc
//=====================================
// If !lightMap and prec material was lihgtmap => vertex setup is dirty!
if( matShader != CMaterial::LightMap && _LastVertexSetupIsLightMap )
resetLightMapVertexSetup();
// Textures user matrix
if (matShader == CMaterial::Normal)
{
@ -765,10 +761,6 @@ sint CDriverGL3::beginLightMapMultiPass ()
_DriverGLStates.setAmbient(packedColorBlack, glcolBlack);
_DriverGLStates.setSpecular(packedColorBlack, glcolBlack);
// reset VertexColor array if necessary.
if (_LastVB.VertexFormat & CVertexBuffer::PrimaryColorFlag)
_DriverGLStates.enableColorArray(false);
// Manage too if no lightmaps.
return std::max (_NLightMapPass, (uint)1);
}
@ -914,13 +906,6 @@ void CDriverGL3::setupLightMapPass(uint pass)
_CurrentTexEnvSpecial[stage] = TexEnvSpecialLightMap;
}
}
// setup UV, with UV1. Only if needed (cached)
if( !_LastVertexSetupIsLightMap || _LightMapUVMap[stage]!=1 )
{
setupUVPtr(stage, _LastVB, 1);
_LightMapUVMap[stage]= 1;
}
}
// Next lightmap.
@ -949,13 +934,6 @@ void CDriverGL3::setupLightMapPass(uint pass)
setUniform1i( tl, stage );
}
// setup UV, with UV0. Only if needed (cached)
if( !_LastVertexSetupIsLightMap || _LightMapUVMap[stage]!=0 )
{
setupUVPtr(stage, _LastVB, 0);
_LightMapUVMap[stage]= 0;
}
}
}
else
@ -1036,37 +1014,6 @@ void CDriverGL3::setupLightMapPass(uint pass)
void CDriverGL3::endLightMapMultiPass()
{
H_AUTO_OGL(CDriverGL3_endLightMapMultiPass)
// Flag the fact that VertexSetup is dirty (special lightmap). reseted in activeVertexBuffer(), and setupMaterial()
// NB: if no lightmaps, no setupUVPtr() has been called => don't need to flag
// (important else crash if graphist error while exporting a Lightmap material, with a MeshVertexProgram (WindTree) )
if(_NLightMaps!=0)
_LastVertexSetupIsLightMap= true;
// nothing to do with blending/lighting, since always setuped in activeMaterial().
// If material is the same, then it is still a lightmap material (if changed => touched => different!)
// So no need to reset blending/lighting here.
}
// ***************************************************************************
void CDriverGL3::resetLightMapVertexSetup()
{
H_AUTO_OGL(CDriverGL3_resetLightMapVertexSetup)
// special for all stage, std UV behavior.
for(uint i = 0; i < inlGetNumTextStages(); i++)
{
// normal behavior: each texture has its own UV.
setupUVPtr(i, _LastVB, i);
// reset cache
_LightMapUVMap[i]= -1;
}
// pop VertexColor array if necessary.
if (_LastVB.VertexFormat & CVertexBuffer::PrimaryColorFlag)
_DriverGLStates.enableColorArray(true);
// flag
_LastVertexSetupIsLightMap= false;
}
// ***************************************************************************

@ -648,48 +648,6 @@ void CDriverGLStates3::forceActiveTextureARB(uint stage)
_CurrentActiveTextureARB= stage;
}
// ***************************************************************************
void CDriverGLStates3::enableVertexArray(bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::enableNormalArray(bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::enableWeightArray(bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::enableColorArray(bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::enableSecondaryColorArray(bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::clientActiveTextureARB(uint stage)
{
}
// ***************************************************************************
void CDriverGLStates3::enableTexCoordArray(bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::enableVertexAttribArray(uint glIndex, bool enable)
{
}
// ***************************************************************************
void CDriverGLStates3::enableVertexAttribArrayARB(uint glIndex,bool enable)
{

@ -153,29 +153,10 @@ public:
void resetTextureMode();
// @}
/// \name Vertex Array enabling.
/// equivalent to glEnableClientState() / glDisableClientState(). NB: Not modified by forceDefaults()
// @{
void enableVertexArray(bool enable);
void enableNormalArray(bool enable);
void enableWeightArray(bool enable);
void enableColorArray(bool enable);
void enableSecondaryColorArray(bool enable);
/// same as glClientActiveTextureARB(). useful for enableTexCoordArray.
void clientActiveTextureARB(uint stage);
/// NB: caller must call correct clientActiveTextureARB() before.
void enableTexCoordArray(bool enable);
/** For vertexProgram. do not check if supported or not.
*/
void enableVertexAttribArray(uint glIndex, bool enable);
// special version for ARB_vertex_program used with ARB_vertex_buffer or ATI_vertex_attrib_array_object
void enableVertexAttribArrayARB(uint glIndex, bool enable);
// @}
// ARB_vertex_buffer_object buffer binding
void bindARBVertexBuffer(uint objectID);
void forceBindARBVertexBuffer(uint objectID);

@ -149,9 +149,6 @@ bool CDriverGL3::activeVertexBuffer(CVertexBuffer& VB)
// NB: must duplicate changes in activeVertexBufferHard()
uint32 flags;
// In any case, we'll erase any special vertex setup for Lightmap Material
_LastVertexSetupIsLightMap= false;
// setup
if (!setupVertexBuffer(VB))
return false;
@ -202,23 +199,6 @@ bool CDriverGL3::activeIndexBuffer(CIndexBuffer& IB)
return true;
}
// ***************************************************************************
void CDriverGL3::setupUVPtr(uint stage, CVertexBufferInfo &VB, uint uvId)
{
}
// ***************************************************************************
void CDriverGL3::mapTextureStageToUV(uint stage, uint uv)
{
H_AUTO_OGL(CDriverGL3_mapTextureStageToUV)
// Just call it for last VertexBuffer setuped.
setupUVPtr(stage, _LastVB, uv);
}
// ***************************************************************************
// ***************************************************************************
// VertexBufferHard
@ -372,23 +352,6 @@ const uint CDriverGL3::GLVertexAttribIndex[CVertexBuffer::NumValue]=
7, // Empty
};
// ***************************************************************************
void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb)
{
}
// ***************************************************************************
void CDriverGL3::toggleGlArraysForARBVertexProgram()
{
H_AUTO_OGL(CDriverGL3_toggleGlArraysForARBVertexProgram)
// If change of setup type, must disable olds.
//=======================
}
// tells for each vertex argument if it must be normalized when it is an integral type
static const GLboolean ARBVertexProgramMustNormalizeAttrib[] =
{
@ -411,9 +374,9 @@ static const GLboolean ARBVertexProgramMustNormalizeAttrib[] =
};
// ***************************************************************************
void CDriverGL3::setupGlArraysForARBVertexProgram(CVertexBufferInfo &vb)
void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb)
{
H_AUTO_OGL(CDriverGL3_setupGlArraysForARBVertexProgram)
H_AUTO_OGL(CDriverGL3_setupGlArrays)
uint32 flags= vb.VertexFormat;
@ -453,15 +416,6 @@ void CDriverGL3::setupGlArraysForARBVertexProgram(CVertexBufferInfo &vb)
}
// ***************************************************************************
void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb)
{
H_AUTO_OGL(CDriverGL3_setupGlArrays)
setupGlArraysForARBVertexProgram(vb);
}
// ***************************************************************************
void CVertexBufferInfo::setupVertexBuffer(CVertexBuffer &vb)
{

Loading…
Cancel
Save