ogl: remove glMapBuffer as it isn't in gles

This commit is contained in:
degasus 2013-08-19 19:20:10 +02:00
parent 1675f56f02
commit 23ce6b9227
4 changed files with 4 additions and 10 deletions

View File

@ -5,7 +5,6 @@
#include "Log.h" #include "Log.h"
#include <dlfcn.h> #include <dlfcn.h>
#ifdef USE_GLES3 #ifdef USE_GLES3
PFNGLMAPBUFFERPROC glMapBuffer;
PFNGLMAPBUFFERRANGEPROC glMapBufferRange; PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
PFNGLUNMAPBUFFERPROC glUnmapBuffer; PFNGLUNMAPBUFFERPROC glUnmapBuffer;
PFNGLBINDBUFFERRANGEPROC glBindBufferRange; PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
@ -72,11 +71,6 @@ namespace GLFunc
LoadFunction("glDeleteQueries", (void**)&glDeleteQueries); LoadFunction("glDeleteQueries", (void**)&glDeleteQueries);
LoadFunction("glGenQueries", (void**)&glGenQueries); LoadFunction("glGenQueries", (void**)&glGenQueries);
{ {
#ifdef USE_GLES
LoadFunction("glMapBufferOES", (void**)&glMapBuffer);
#else
LoadFunction("glMapBuffer", (void**)&glMapBuffer);
#endif
LoadFunction("glUnmapBuffer", (void**)&glUnmapBuffer); LoadFunction("glUnmapBuffer", (void**)&glUnmapBuffer);
LoadFunction("glMapBufferRange", (void**)&glMapBufferRange); LoadFunction("glMapBufferRange", (void**)&glMapBufferRange);
LoadFunction("glBindBufferRange", (void**)&glBindBufferRange); LoadFunction("glBindBufferRange", (void**)&glBindBufferRange);

View File

@ -55,7 +55,6 @@ extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
extern PFNGLDELETEQUERIESPROC glDeleteQueries; extern PFNGLDELETEQUERIESPROC glDeleteQueries;
extern PFNGLGENQUERIESPROC glGenQueries; extern PFNGLGENQUERIESPROC glGenQueries;
extern PFNGLMAPBUFFERPROC glMapBuffer;
extern PFNGLUNMAPBUFFERPROC glUnmapBuffer; extern PFNGLUNMAPBUFFERPROC glUnmapBuffer;
extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange; extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange; extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;

View File

@ -677,9 +677,10 @@ void Renderer::DrawDebugInfo()
glLineWidth(3.0f); glLineWidth(3.0f);
// 2*Coords + 3*Color // 2*Coords + 3*Color
u32 length = stats.efb_regions.size() * sizeof(GLfloat) * (2+3)*2*6;
glBindBuffer(GL_ARRAY_BUFFER, s_ShowEFBCopyRegions_VBO); 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); glBufferData(GL_ARRAY_BUFFER, length, NULL, GL_STREAM_DRAW);
GLfloat *Vertices = (GLfloat*)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); GLfloat *Vertices = (GLfloat*)glMapBufferRange(GL_ARRAY_BUFFER, 0, length, GL_MAP_WRITE_BIT);
// Draw EFB copy regions rectangles // Draw EFB copy regions rectangles
int a = 0; int a = 0;

View File

@ -194,7 +194,7 @@ void StreamBuffer::Init()
case MAP_AND_RISK: case MAP_AND_RISK:
glBindBuffer(m_buffertype, m_buffer); glBindBuffer(m_buffertype, m_buffer);
glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW); 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); glUnmapBuffer(m_buffertype);
if(!pointer) if(!pointer)
ERROR_LOG(VIDEO, "Buffer allocation failed"); ERROR_LOG(VIDEO, "Buffer allocation failed");