Since we use HW VBO, we don't need to actually check for it.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 12 years ago
parent b444f69db3
commit 5e69d558ec

@ -249,9 +249,7 @@ CDriverGL3::CDriverGL3()
_CurrentVertexBufferHard= NULL;
_NVCurrentVARPtr= NULL;
_NVCurrentVARSize= 0;
_SupportVBHard= false;
_SlowUnlockVBHard= false;
_MaxVerticesByVBHard= 0;
_AllocatedTextureMemory= 0;
@ -436,18 +434,10 @@ bool CDriverGL3::setupDisplay()
_LastSetupGLArrayVertexProgram= false;
// Init VertexArrayRange according to supported extenstion.
_SupportVBHard= false;
_SlowUnlockVBHard= false;
_MaxVerticesByVBHard= 0;
// Try with ARB ext first.
if (_Extensions.ARBVertexBufferObject)
{
_AGPVertexArrayRange= new CVertexArrayRangeARB(this);
_VRAMVertexArrayRange= new CVertexArrayRangeARB(this);
_SupportVBHard= true;
_MaxVerticesByVBHard = std::numeric_limits<uint32>::max(); // cant' know the value..
}
_AGPVertexArrayRange= new CVertexArrayRangeARB(this);
_VRAMVertexArrayRange= new CVertexArrayRangeARB(this);
// Reset VertexArrayRange.
_CurrentVertexArrayRange= NULL;
@ -455,9 +445,7 @@ bool CDriverGL3::setupDisplay()
_NVCurrentVARPtr= NULL;
_NVCurrentVARSize= 0;
if( _SupportVBHard )
initVertexBufferHard(NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, 0);
initVertexBufferHard(NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, 0);
// Init embm if present
//===========================================================
@ -744,7 +732,7 @@ bool CDriverGL3::swapBuffers()
/* Yoyo: must do this (GeForce bug ??) else weird results if end render with a VBHard.
Setup a std vertex buffer to ensure NVidia synchronisation.
*/
if (!_Extensions.ARBVertexBufferObject )
if( false )
{
static CVertexBuffer dummyVB;
static bool dummyVBinit= false;

@ -1232,10 +1232,7 @@ private:
void *_NVCurrentVARPtr;
uint32 _NVCurrentVARSize;
// Info got from ATI or NVidia extension.
bool _SupportVBHard;
bool _SlowUnlockVBHard;
uint32 _MaxVerticesByVBHard;
// The AGP VertexArrayRange.
IVertexArrayRange *_AGPVertexArrayRange;

@ -1320,14 +1320,6 @@ void registerGlExtensions(CGlExtensions &ext)
ext.ATITextureEnvCombine3= setupATITextureEnvCombine3(glext);
// Check ATIXTextureEnvRoute
ext.ATIXTextureEnvRoute= setupATIXTextureEnvRoute(glext);
// ARB extensions
// -------------
if(!ext.DisableHardwareVertexArrayAGP)
{
ext.ARBVertexBufferObject = setupARBVertexBufferObject(glext);
}
}

@ -87,7 +87,6 @@ struct CGlExtensions
// ARB Extensions
bool ARBTextureCompression;
bool ARBFragmentProgram;
bool ARBVertexBufferObject;
bool ARBVertexProgram;
bool ARBTextureNonPowerOfTwo;
bool ARBMultisample;
@ -135,7 +134,6 @@ public:
ATIFragmentShader = false;
EXTVertexShader= false;
ARBFragmentProgram = false;
ARBVertexBufferObject = false;
ARBVertexProgram = false;
NVTextureRectangle = false;
EXTTextureRectangle = false;
@ -216,7 +214,7 @@ public:
#endif
result += "\n Array/VBO: ";
result += ARBVertexBufferObject ? "ARB VBO " : "";
result += "VertexBufferObject";
result += "\n FBO: ";
result += FrameBufferObject ? "FramebufferObject " : "";

@ -701,7 +701,7 @@ void CDriverGL3::mapTextureStageToUV(uint stage, uint uv)
bool CDriverGL3::supportVertexBufferHard() const
{
H_AUTO_OGL(CDriverGL3_supportVertexBufferHard)
return _SupportVBHard;
return true;
}
// ***************************************************************************
@ -725,7 +725,7 @@ bool CDriverGL3::slowUnlockVertexBufferHard() const
uint CDriverGL3::getMaxVerticesByVertexBufferHard() const
{
H_AUTO_OGL(CDriverGL3_getMaxVerticesByVertexBufferHard)
return _MaxVerticesByVBHard;
return std::numeric_limits<uint32>::max();
}
@ -755,10 +755,6 @@ IVertexBufferHardGL *CDriverGL3::createVertexBufferHard(uint size, uint numVerti
return NULL;
else
{
// check max vertex
if(numVertices > _MaxVerticesByVBHard)
return NULL;
// Create a CVertexBufferHardGL
IVertexBufferHardGL *vbHard = NULL;
// let the VAR create the vbhard.

Loading…
Cancel
Save