diff --git a/code/nel/include/nel/3d/vertex_buffer.h b/code/nel/include/nel/3d/vertex_buffer.h index 6c269ec6c..40fa7f751 100644 --- a/code/nel/include/nel/3d/vertex_buffer.h +++ b/code/nel/include/nel/3d/vertex_buffer.h @@ -1202,7 +1202,7 @@ inline void CVertexBuffer::lock (CVertexBufferRead &accessor, uint first, uint l if (last == 0) last = _NbVerts; // Can read it ? - nlassertex (_Location==RAMResident, ("Try to read a write only vertex buffer")); + //nlassertex (_Location==RAMResident, ("Try to read a write only vertex buffer")); _LockedBuffer = DrvInfos->lock (first*_VertexSize, last*_VertexSize, true); } else 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 f57e1454a..cdd95ba6a 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp @@ -145,19 +145,15 @@ bool CDriverGL3::setupVertexBuffer(CVertexBuffer& VB) // Preferred memory CVertexBuffer::TPreferredMemory preferred = VB.getPreferredMemory (); - if ((preferred == CVertexBuffer::RAMVolatile) || (preferred == CVertexBuffer::AGPVolatile)) - preferred = CVertexBuffer::RAMPreferred; - const uint size = VB.capacity()*VB.getVertexSize(); - uint preferredMemory = _Extensions.DisableHardwareVertexArrayAGP ? CVertexBuffer::RAMPreferred : preferred; - while (preferredMemory != CVertexBuffer::RAMPreferred) - { - // Vertex buffer hard - info->_VBHard = createVertexBufferHard(size, VB.capacity(), (CVertexBuffer::TPreferredMemory)preferredMemory, &VB); - if (info->_VBHard) - break; - preferredMemory--; - } + if ((preferred == CVertexBuffer::RAMVolatile) || + (preferred == CVertexBuffer::AGPVolatile) || + (preferred == CVertexBuffer::RAMPreferred ) ) + preferred = CVertexBuffer::AGPPreferred; + const uint size = VB.capacity()*VB.getVertexSize(); + + // Vertex buffer hard + info->_VBHard = createVertexBufferHard(size, VB.capacity(), preferred, &VB); // No memory found ? Use system memory if (info->_VBHard == NULL) { @@ -166,7 +162,7 @@ bool CDriverGL3::setupVertexBuffer(CVertexBuffer& VB) } // Upload the data - VB.setLocation ((CVertexBuffer::TLocation)preferredMemory); + VB.setLocation ((CVertexBuffer::TLocation)preferred); } }