From f3766f9c40894f7e944257dce0239c12d7a4d3c3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 5 Jun 2014 12:02:23 +0200 Subject: [PATCH] GL3: Implement RAMPreferred --HG-- branch : opengl3 --- .../src/3d/driver/opengl3/driver_opengl_vertex_buffer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl_vertex_buffer.cpp b/code/nel/src/3d/driver/opengl3/driver_opengl_vertex_buffer.cpp index ebca0564a..61130fb54 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl_vertex_buffer.cpp +++ b/code/nel/src/3d/driver/opengl3/driver_opengl_vertex_buffer.cpp @@ -148,7 +148,12 @@ void *CVertexBufferGL::lock() case CVertexBuffer::RAMVolatile: m_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); break; + case CVertexBuffer::RAMPreferred: + // m_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_READ_BIT); + m_VertexPtr = nglMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE); + break; default: + // m_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT); m_VertexPtr = nglMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); break; }