From 44188b58b767e631721e01fb2dcd614809cba670 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 1 Aug 2013 06:50:29 +0200 Subject: [PATCH] We only have 1 kind of HW VBO left. --HG-- branch : gsoc2013-dfighter --- code/nel/src/3d/driver/OpenGL3/driver_opengl.h | 2 +- .../3d/driver/OpenGL3/driver_opengl_vertex.cpp | 18 ++++++++---------- .../driver_opengl_vertex_buffer_hard.cpp | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl.h b/code/nel/src/3d/driver/OpenGL3/driver_opengl.h index 49fb89354..b6904d5c5 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl.h +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl.h @@ -254,7 +254,7 @@ public: void *ValuePtr[CVertexBuffer::NumValue]; - enum TVBMode { TVBModeNone = 0, SysMem, HwNVIDIA, HwARB, HwATI }; // standard VBs, or Hard VBs using different extensions + enum TVBMode { TVBModeNone = 0, SysMem, HW }; // standard VBs, or Hard VBs using different extensions // Kind of vb TVBMode VBMode; diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp index c231d7ad7..f57e1454a 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp @@ -206,7 +206,7 @@ bool CDriverGL3::activeVertexBuffer(CVertexBuffer& VB) if (!info->_VBHard || (info->_VBHard && !info->_VBHard->isInvalid())) { _LastVB.setupVertexBuffer(VB); - if (lastVBMode == CVertexBufferInfo::HwARB && _LastVB.VBMode != CVertexBufferInfo::HwARB) + if (lastVBMode == CVertexBufferInfo::HW && _LastVB.VBMode != CVertexBufferInfo::HW) { _DriverGLStates.bindARBVertexBuffer(0); // unbind ARB vertex buffer } @@ -657,13 +657,12 @@ void CDriverGL3::setupUVPtr(uint stage, CVertexBufferInfo &VB, uint uvId) // Setup ATI VBHard or std ptr. switch(VB.VBMode) { - case CVertexBufferInfo::HwARB: + case CVertexBufferInfo::HW: _DriverGLStates.bindARBVertexBuffer(VB.VertexObjectId); // with arb buffers, position is relative to the start of the stream glTexCoordPointer(numTexCoord,GL_FLOAT,VB.VertexSize, VB.ValuePtr[CVertexBuffer::TexCoord0+uvId]); break; case CVertexBufferInfo::SysMem: - case CVertexBufferInfo::HwNVIDIA: glTexCoordPointer(numTexCoord,GL_FLOAT,VB.VertexSize, VB.ValuePtr[CVertexBuffer::TexCoord0+uvId]); break; default: @@ -859,7 +858,7 @@ void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb) H_AUTO_OGL(CDriverGL3_setupGlArraysStd) uint32 flags= vb.VertexFormat; - if (vb.VBMode == CVertexBufferInfo::HwARB) + if (vb.VBMode == CVertexBufferInfo::HW) { _DriverGLStates.bindARBVertexBuffer(vb.VertexObjectId); } @@ -867,8 +866,7 @@ void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb) switch(vb.VBMode) { case CVertexBufferInfo::SysMem: - case CVertexBufferInfo::HwNVIDIA: - case CVertexBufferInfo::HwARB: + case CVertexBufferInfo::HW: { // setup vertex ptr. //----------- @@ -1093,7 +1091,7 @@ void CDriverGL3::setupGlArraysForNVVertexProgram(CVertexBufferInfo &vb) H_AUTO_OGL(CDriverGL3_setupGlArraysForNVVertexProgram) uint16 flags= vb.VertexFormat; - if (vb.VBMode == CVertexBufferInfo::HwARB) + if (vb.VBMode == CVertexBufferInfo::HW) _DriverGLStates.bindARBVertexBuffer(vb.VertexObjectId); // For each value @@ -1172,7 +1170,7 @@ void CDriverGL3::setupGlArraysForNVVertexProgram(CVertexBufferInfo &vb) } } - if (vb.VBMode == CVertexBufferInfo::HwARB) + if (vb.VBMode == CVertexBufferInfo::HW) _DriverGLStates.bindARBVertexBuffer(0); } @@ -1207,7 +1205,7 @@ void CDriverGL3::setupGlArraysForARBVertexProgram(CVertexBufferInfo &vb) nlctassert(CVertexBuffer::NumValue == sizeof(ARBVertexProgramMustNormalizeAttrib) / sizeof(ARBVertexProgramMustNormalizeAttrib[0])); - if (vb.VBMode == CVertexBufferInfo::HwARB) + if (vb.VBMode == CVertexBufferInfo::HW) { _DriverGLStates.bindARBVertexBuffer(vb.VertexObjectId); } @@ -1260,7 +1258,7 @@ void CDriverGL3::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb) uint32 flags= vb.VertexFormat; - if (vb.VBMode == CVertexBufferInfo::HwARB) + if (vb.VBMode == CVertexBufferInfo::HW) { _DriverGLStates.bindARBVertexBuffer(vb.VertexObjectId); } diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_buffer_hard.cpp b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_buffer_hard.cpp index 2dedb389b..fc11e8131 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_buffer_hard.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_buffer_hard.cpp @@ -419,7 +419,7 @@ void CVertexBufferHardARB::lockHintStatic(bool /* staticLock */) void CVertexBufferHardARB::setupVBInfos(CVertexBufferInfo &vb) { H_AUTO_OGL(CVertexBufferHardARB_setupVBInfos) - vb.VBMode = CVertexBufferInfo::HwARB; + vb.VBMode = CVertexBufferInfo::HW; vb.VertexObjectId = _VertexObjectId; }