From 23ce6b922722aea61980742f3d88e7f6c6312e3f Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 19 Aug 2013 19:20:10 +0200 Subject: [PATCH] ogl: remove glMapBuffer as it isn't in gles --- Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp | 6 ------ Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h | 1 - Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 5 +++-- Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp index 1f4711550c..8360f9631e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp @@ -5,7 +5,6 @@ #include "Log.h" #include #ifdef USE_GLES3 -PFNGLMAPBUFFERPROC glMapBuffer; PFNGLMAPBUFFERRANGEPROC glMapBufferRange; PFNGLUNMAPBUFFERPROC glUnmapBuffer; PFNGLBINDBUFFERRANGEPROC glBindBufferRange; @@ -72,11 +71,6 @@ namespace GLFunc LoadFunction("glDeleteQueries", (void**)&glDeleteQueries); LoadFunction("glGenQueries", (void**)&glGenQueries); { -#ifdef USE_GLES - LoadFunction("glMapBufferOES", (void**)&glMapBuffer); -#else - LoadFunction("glMapBuffer", (void**)&glMapBuffer); -#endif LoadFunction("glUnmapBuffer", (void**)&glUnmapBuffer); LoadFunction("glMapBufferRange", (void**)&glMapBufferRange); LoadFunction("glBindBufferRange", (void**)&glBindBufferRange); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h index db1c7a1760..74fed7e227 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h @@ -55,7 +55,6 @@ extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv; extern PFNGLDELETEQUERIESPROC glDeleteQueries; extern PFNGLGENQUERIESPROC glGenQueries; -extern PFNGLMAPBUFFERPROC glMapBuffer; extern PFNGLUNMAPBUFFERPROC glUnmapBuffer; extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange; extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 5c2f2e1bd1..126294b857 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -677,9 +677,10 @@ void Renderer::DrawDebugInfo() glLineWidth(3.0f); // 2*Coords + 3*Color + u32 length = stats.efb_regions.size() * sizeof(GLfloat) * (2+3)*2*6; glBindBuffer(GL_ARRAY_BUFFER, s_ShowEFBCopyRegions_VBO); - glBufferData(GL_ARRAY_BUFFER, stats.efb_regions.size() * sizeof(GLfloat) * (2+3)*2*6, NULL, GL_STREAM_DRAW); - GLfloat *Vertices = (GLfloat*)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); + glBufferData(GL_ARRAY_BUFFER, length, NULL, GL_STREAM_DRAW); + GLfloat *Vertices = (GLfloat*)glMapBufferRange(GL_ARRAY_BUFFER, 0, length, GL_MAP_WRITE_BIT); // Draw EFB copy regions rectangles int a = 0; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp index 0c494693fc..af013467eb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp @@ -194,7 +194,7 @@ void StreamBuffer::Init() case MAP_AND_RISK: glBindBuffer(m_buffertype, m_buffer); glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW); - pointer = (u8*)glMapBuffer(m_buffertype, GL_WRITE_ONLY); + pointer = (u8*)glMapBufferRange(m_buffertype, 0, m_size, GL_MAP_WRITE_BIT); glUnmapBuffer(m_buffertype); if(!pointer) ERROR_LOG(VIDEO, "Buffer allocation failed");