Removed the ARB word from the names of CVertexArrayRangeARB and CVertexBufferHardARB.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 12 years ago
parent cfc4565b5d
commit 31451aa0f6

@ -436,8 +436,8 @@ bool CDriverGL3::setupDisplay()
// Init VertexArrayRange according to supported extenstion.
_SlowUnlockVBHard= false;
_AGPVertexArrayRange= new CVertexArrayRangeARB(this);
_VRAMVertexArrayRange= new CVertexArrayRangeARB(this);
_AGPVertexArrayRange= new CVertexArrayRange(this);
_VRAMVertexArrayRange= new CVertexArrayRange(this);
// Reset VertexArrayRange.
_CurrentVertexArrayRange= NULL;

@ -489,7 +489,7 @@ public:
virtual const char* getDriverInformation ()
{
return "Opengl 1.2 NeL Driver";
return "Opengl 3.3 Core NeL Driver";
}
virtual const char* getVideocardInformation ();
@ -1212,8 +1212,8 @@ private:
/// \name VertexBufferHard
// @{
CPtrSet<IVertexBufferHardGL> _VertexBufferHardSet;
friend class CVertexArrayRangeARB;
friend class CVertexBufferHardARB;
friend class CVertexArrayRange;
friend class CVertexBufferHard;
friend class CVBDrvInfosGL3;
// The VertexArrayRange activated.

@ -62,16 +62,16 @@ IVertexBufferHardGL::~IVertexBufferHardGL()
// ***************************************************************************
CVertexArrayRangeARB::CVertexArrayRangeARB(CDriverGL3 *drv) : IVertexArrayRange(drv),
CVertexArrayRange::CVertexArrayRange(CDriverGL3 *drv) : IVertexArrayRange(drv),
_VBType(CVertexBuffer::AGPPreferred)
{
H_AUTO_OGL(CVertexArrayRangeARB_CVertexArrayRangeARB)
}
// ***************************************************************************
IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuffer *vb)
IVertexBufferHardGL *CVertexArrayRange::createVBHardGL(uint size, CVertexBuffer *vb)
{
H_AUTO_OGL(CVertexArrayRangeARB_createVBHardGL)
H_AUTO_OGL(CVertexArrayRange_createVBHardGL)
// create a ARB VBHard
GLuint vertexBufferID;
@ -101,14 +101,14 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
nglDeleteBuffersARB(1, &vertexBufferID);
return NULL;
}
CVertexBufferHardARB *newVbHard= new CVertexBufferHardARB(_Driver, vb);
CVertexBufferHard *newVbHard= new CVertexBufferHard(_Driver, vb);
newVbHard->initGL(vertexBufferID, this, _VBType);
_Driver->_DriverGLStates.forceBindARBVertexBuffer(0);
return newVbHard;
}
// ***************************************************************************
void CVertexArrayRangeARB::enable()
void CVertexArrayRange::enable()
{
H_AUTO_OGL(CVertexArrayRangeARB_enable)
if(_Driver->_CurrentVertexArrayRange != this)
@ -118,7 +118,7 @@ void CVertexArrayRangeARB::enable()
}
// ***************************************************************************
void CVertexArrayRangeARB::disable()
void CVertexArrayRange::disable()
{
H_AUTO_OGL(CVertexArrayRangeARB_disbale)
if(_Driver->_CurrentVertexBufferHard != NULL)
@ -128,7 +128,7 @@ void CVertexArrayRangeARB::disable()
}
// ***************************************************************************
void CVertexArrayRangeARB::updateLostBuffers()
void CVertexArrayRange::updateLostBuffers()
{
H_AUTO_OGL(CVertexArrayRangeARB_updateLostBuffers)
// Put all vb that have been lost in the NotResident state so that they will be recomputed
@ -136,7 +136,7 @@ void CVertexArrayRangeARB::updateLostBuffers()
nlassert(_Driver);
if (_Driver->isWndActive())
{
for(std::list<CVertexBufferHardARB *>::iterator it = _LostVBList.begin(); it != _LostVBList.end(); ++it)
for(std::list<CVertexBufferHard *>::iterator it = _LostVBList.begin(); it != _LostVBList.end(); ++it)
{
nlassert((*it)->_VertexObjectId);
GLuint id = (GLuint) (*it)->_VertexObjectId;
@ -156,7 +156,7 @@ void CVertexArrayRangeARB::updateLostBuffers()
// ***************************************************************************
CVertexBufferHardARB::CVertexBufferHardARB(CDriverGL3 *drv, CVertexBuffer *vb) : IVertexBufferHardGL(drv, vb),
CVertexBufferHard::CVertexBufferHard(CDriverGL3 *drv, CVertexBuffer *vb) : IVertexBufferHardGL(drv, vb),
_VertexPtr(NULL),
_VertexObjectId(0)
@ -171,7 +171,7 @@ CVertexBufferHardARB::CVertexBufferHardARB(CDriverGL3 *drv, CVertexBuffer *vb) :
}
// ***************************************************************************
CVertexBufferHardARB::~CVertexBufferHardARB()
CVertexBufferHard::~CVertexBufferHard()
{
H_AUTO_OGL(CVertexBufferHardARB_CVertexBufferHardARBDtor)
if (_Driver && _VertexObjectId)
@ -208,7 +208,7 @@ CVertexBufferHardARB::~CVertexBufferHardARB()
}
// ***************************************************************************
void *CVertexBufferHardARB::lock()
void *CVertexBufferHard::lock()
{
H_AUTO_OGL(CVertexBufferHardARB_lock);
@ -293,7 +293,7 @@ void *CVertexBufferHardARB::lock()
}
// ***************************************************************************
void CVertexBufferHardARB::unlock()
void CVertexBufferHard::unlock()
{
H_AUTO_OGL(CVertexBufferHardARB_unlock);
@ -337,21 +337,21 @@ void CVertexBufferHardARB::unlock()
}
// ***************************************************************************
void *CVertexBufferHardARB::getPointer()
void *CVertexBufferHard::getPointer()
{
H_AUTO_OGL(CVertexBufferHardARB_getPointer)
return _VertexPtr;
}
// ***************************************************************************
void CVertexBufferHardARB::unlock(uint /* startVert */,uint /* endVert */)
void CVertexBufferHard::unlock(uint /* startVert */,uint /* endVert */)
{
H_AUTO_OGL(CVertexBufferHardARB_unlock)
unlock(); // can't do a lock on a range of the vb..
}
// ***************************************************************************
void CVertexBufferHardARB::enable()
void CVertexBufferHard::enable()
{
H_AUTO_OGL(CVertexBufferHardARB_enable)
if(_Driver->_CurrentVertexBufferHard != this)
@ -363,7 +363,7 @@ void CVertexBufferHardARB::enable()
}
// ***************************************************************************
void CVertexBufferHardARB::disable()
void CVertexBufferHard::disable()
{
H_AUTO_OGL(CVertexBufferHardARB_disable)
if(_Driver->_CurrentVertexBufferHard != NULL)
@ -375,7 +375,7 @@ void CVertexBufferHardARB::disable()
}
// ***************************************************************************
void CVertexBufferHardARB::initGL(uint vertexObjectID, CVertexArrayRangeARB *var, CVertexBuffer::TPreferredMemory memType)
void CVertexBufferHard::initGL(uint vertexObjectID, CVertexArrayRange *var, CVertexBuffer::TPreferredMemory memType)
{
H_AUTO_OGL(CVertexBufferHardARB_initGL)
_VertexObjectId = vertexObjectID;
@ -384,21 +384,21 @@ void CVertexBufferHardARB::initGL(uint vertexObjectID, CVertexArrayRangeARB *var
}
// ***************************************************************************
void CVertexBufferHardARB::lockHintStatic(bool /* staticLock */)
void CVertexBufferHard::lockHintStatic(bool /* staticLock */)
{
H_AUTO_OGL(CVertexBufferHardARB_lockHintStatic)
// no op.
}
// ***************************************************************************
void CVertexBufferHardARB::setupVBInfos(CVertexBufferInfo &vb)
void CVertexBufferHard::setupVBInfos(CVertexBufferInfo &vb)
{
H_AUTO_OGL(CVertexBufferHardARB_setupVBInfos)
vb.VertexObjectId = _VertexObjectId;
}
// ***************************************************************************
void CVertexBufferHardARB::invalidate()
void CVertexBufferHard::invalidate()
{
H_AUTO_OGL(CVertexBufferHardARB_invalidate)
nlassert(!_Invalid);
@ -414,13 +414,13 @@ void CVertexBufferHardARB::invalidate()
// ***************************************************************************
#ifdef NL_DEBUG
void CVertexArrayRangeARB::dumpMappedBuffers()
void CVertexArrayRange::dumpMappedBuffers()
{
nlwarning("*****************************************************");
nlwarning("Mapped buffers :");
for(std::list<CVertexBufferHardARB *>::iterator it = _MappedVBList.begin(); it != _MappedVBList.end(); ++it)
for(std::list<CVertexBufferHard *>::iterator it = _MappedVBList.begin(); it != _MappedVBList.end(); ++it)
{
CVertexBufferHardARB &vbarb = **it;
CVertexBufferHard &vbarb = **it;
nlwarning("Buffer id = %u, size = %u, address = %p", vbarb._VertexObjectId, vbarb.VB->getVertexSize() * vbarb.VB->getNumVertices(), vbarb.getPointer());
}
}

@ -29,17 +29,7 @@ namespace NLDRIVERGL3 {
class CDriverGL;
class IVertexBufferHardGL;
class CVertexBufferInfo;
class CVertexBufferHardGLMapObjectATI;
class CVertexBufferHardARB;
// ***************************************************************************
// ***************************************************************************
// VBHard interface for both NVidia / ATI extension.
// ***************************************************************************
// ***************************************************************************
class CVertexBufferHard;
// ***************************************************************************
/** Interface to a Big block of video memory
@ -66,27 +56,18 @@ protected:
// ***************************************************************************
/** Common interface for both NVidia and ATI extenstion
*
*/
class IVertexBufferHardGL
{
public:
IVertexBufferHardGL(CDriverGL3 *drv, CVertexBuffer *vb);
virtual ~IVertexBufferHardGL();
// ATI and NVidia have their own methods.
virtual void *lock() = 0;
virtual void unlock() = 0;
virtual void unlock(uint start, uint end) = 0;
virtual void *getPointer() = 0;
virtual void enable() =0;
virtual void disable() =0;
virtual void setupVBInfos(CVertexBufferInfo &vb) = 0;
// test if buffer content is invalid. If so, no rendering should occurs (rendering should silently fail)
@ -107,10 +88,10 @@ protected:
// ARB_vertex_buffer_object implementation
// ***************************************************************************
// ***************************************************************************
class CVertexArrayRangeARB : public IVertexArrayRange
class CVertexArrayRange : public IVertexArrayRange
{
public:
CVertexArrayRangeARB(CDriverGL3 *drv);
CVertexArrayRange(CDriverGL3 *drv);
virtual IVertexBufferHardGL *createVBHardGL(uint size, CVertexBuffer *vb);
@ -134,21 +115,21 @@ private:
CVertexBuffer::TPreferredMemory _VBType;
// for use by CVertexBufferHardARB
public:
std::list<CVertexBufferHardARB *> _LostVBList;
std::list<CVertexBufferHard*> _LostVBList;
#ifdef NL_DEBUG
std::list<CVertexBufferHardARB *> _MappedVBList;
std::list<CVertexBufferHard*> _MappedVBList;
#endif
};
/** vb hard using the ARB_vertex_buffer_object extension. Buffer are kept separate rather than managed in a heap
*/
class CVertexBufferHardARB : public IVertexBufferHardGL
class CVertexBufferHard : public IVertexBufferHardGL
{
public:
CVertexBufferHardARB(CDriverGL3 *drv, CVertexBuffer *vb);
virtual ~CVertexBufferHardARB();
CVertexBufferHard(CDriverGL3 *drv, CVertexBuffer *vb);
virtual ~CVertexBufferHard();
/// \name Implementation
@ -165,7 +146,7 @@ public:
/** setup ptrs allocated by createVBHard()
*/
void initGL(uint vertexObjectID, CVertexArrayRangeARB *var, CVertexBuffer::TPreferredMemory memType);
void initGL(uint vertexObjectID, CVertexArrayRange *var, CVertexBuffer::TPreferredMemory memType);
public:
@ -181,20 +162,20 @@ public:
// *************************
private:
CVertexArrayRangeARB *_VertexArrayRange;
CVertexArrayRange *_VertexArrayRange;
CVertexBuffer::TPreferredMemory _MemType;
void *_VertexPtr; // pointer on current datas. Null if not locked
// if buffer has been invalidated, returns a dummy memory block and silently fails rendering
std::vector<uint8> _DummyVB;
// for use by CVertexArrayRangeARB
std::list<CVertexBufferHardARB *>::iterator _IteratorInLostVBList;
// for use by CVertexArrayRange
std::list<CVertexBufferHard*>::iterator _IteratorInLostVBList;
public:
uint _VertexObjectId;
// tmp for debug
#ifdef NL_DEBUG
bool _Unmapping;
std::list<CVertexBufferHardARB *>::iterator _IteratorInMappedVBList;
std::list<CVertexBufferHard*>::iterator _IteratorInMappedVBList;
#endif
};

Loading…
Cancel
Save