Removed the ARB keyword from the VBO managing GL functions, as they are part of the core specification as of OpenGL 3.3

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 12 years ago
parent 31451aa0f6
commit 15b4be874e

@ -7419,29 +7419,29 @@ typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
#ifndef GL_ARB_vertex_buffer_object #ifndef GL_ARB_vertex_buffer_object
#define GL_ARB_vertex_buffer_object 1 #define GL_ARB_vertex_buffer_object 1
#ifdef GL_GLEXT_PROTOTYPES #ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access); GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access);
GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params);
#endif /* GL_GLEXT_PROTOTYPES */ #endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
#endif #endif
#ifndef GL_ARB_occlusion_query #ifndef GL_ARB_occlusion_query

@ -283,17 +283,17 @@ NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB;
//NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB; //NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB;
// GL_ARB_vertex_buffer_object // GL_ARB_vertex_buffer_object
PFNGLBINDBUFFERARBPROC nglBindBufferARB; PFNGLBINDBUFFERPROC nglBindBuffer;
PFNGLDELETEBUFFERSARBPROC nglDeleteBuffersARB; PFNGLDELETEBUFFERSPROC nglDeleteBuffers;
PFNGLGENBUFFERSARBPROC nglGenBuffersARB; PFNGLGENBUFFERSPROC nglGenBuffers;
PFNGLISBUFFERARBPROC nglIsBufferARB; PFNGLISBUFFERPROC nglIsBuffer;
PFNGLBUFFERDATAARBPROC nglBufferDataARB; PFNGLBUFFERDATAPROC nglBufferData;
PFNGLBUFFERSUBDATAARBPROC nglBufferSubDataARB; PFNGLBUFFERSUBDATAPROC nglBufferSubData;
PFNGLGETBUFFERSUBDATAARBPROC nglGetBufferSubDataARB; PFNGLGETBUFFERSUBDATAPROC nglGetBufferSubData;
PFNGLMAPBUFFERARBPROC nglMapBufferARB; PFNGLMAPBUFFERPROC nglMapBuffer;
PFNGLUNMAPBUFFERARBPROC nglUnmapBufferARB; PFNGLUNMAPBUFFERPROC nglUnmapBuffer;
PFNGLGETBUFFERPARAMETERIVARBPROC nglGetBufferParameterivARB; PFNGLGETBUFFERPARAMETERIVPROC nglGetBufferParameteriv;
PFNGLGETBUFFERPOINTERVARBPROC nglGetBufferPointervARB; PFNGLGETBUFFERPOINTERVPROC nglGetBufferPointerv;
// GL_ARB_vertex_program // GL_ARB_vertex_program
PFNGLVERTEXATTRIB1SARBPROC nglVertexAttrib1sARB; PFNGLVERTEXATTRIB1SARBPROC nglVertexAttrib1sARB;
@ -971,17 +971,17 @@ static bool setupARBVertexBufferObject(const char *glext)
CHECK_EXT("GL_ARB_vertex_buffer_object"); CHECK_EXT("GL_ARB_vertex_buffer_object");
CHECK_ADDRESS(PFNGLBINDBUFFERARBPROC, glBindBufferARB); CHECK_ADDRESS(PFNGLBINDBUFFERPROC, glBindBuffer);
CHECK_ADDRESS(PFNGLDELETEBUFFERSARBPROC, glDeleteBuffersARB); CHECK_ADDRESS(PFNGLDELETEBUFFERSPROC, glDeleteBuffers);
CHECK_ADDRESS(PFNGLGENBUFFERSARBPROC, glGenBuffersARB); CHECK_ADDRESS(PFNGLGENBUFFERSPROC, glGenBuffers);
CHECK_ADDRESS(PFNGLISBUFFERARBPROC, glIsBufferARB); CHECK_ADDRESS(PFNGLISBUFFERPROC, glIsBuffer);
CHECK_ADDRESS(PFNGLBUFFERDATAARBPROC, glBufferDataARB); CHECK_ADDRESS(PFNGLBUFFERDATAPROC, glBufferData);
CHECK_ADDRESS(PFNGLBUFFERSUBDATAARBPROC, glBufferSubDataARB); CHECK_ADDRESS(PFNGLBUFFERSUBDATAPROC, glBufferSubData);
CHECK_ADDRESS(PFNGLGETBUFFERSUBDATAARBPROC, glGetBufferSubDataARB); CHECK_ADDRESS(PFNGLGETBUFFERSUBDATAPROC, glGetBufferSubData);
CHECK_ADDRESS(PFNGLMAPBUFFERARBPROC, glMapBufferARB); CHECK_ADDRESS(PFNGLMAPBUFFERPROC, glMapBuffer);
CHECK_ADDRESS(PFNGLUNMAPBUFFERARBPROC, glUnmapBufferARB); CHECK_ADDRESS(PFNGLUNMAPBUFFERPROC, glUnmapBuffer);
CHECK_ADDRESS(PFNGLGETBUFFERPARAMETERIVARBPROC, glGetBufferParameterivARB); CHECK_ADDRESS(PFNGLGETBUFFERPARAMETERIVPROC, glGetBufferParameteriv);
CHECK_ADDRESS(PFNGLGETBUFFERPOINTERVARBPROC, glGetBufferPointervARB); CHECK_ADDRESS(PFNGLGETBUFFERPOINTERVPROC, glGetBufferPointerv);
return true; return true;
} }

@ -495,17 +495,17 @@ extern NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB;
// GL_ARB_vertex_buffer_object // GL_ARB_vertex_buffer_object
//================================== //==================================
extern PFNGLBINDBUFFERARBPROC nglBindBufferARB; extern PFNGLBINDBUFFERPROC nglBindBuffer;
extern PFNGLDELETEBUFFERSARBPROC nglDeleteBuffersARB; extern PFNGLDELETEBUFFERSPROC nglDeleteBuffers;
extern PFNGLGENBUFFERSARBPROC nglGenBuffersARB; extern PFNGLGENBUFFERSPROC nglGenBuffers;
extern PFNGLISBUFFERARBPROC nglIsBufferARB; extern PFNGLISBUFFERPROC nglIsBuffer;
extern PFNGLBUFFERDATAARBPROC nglBufferDataARB; extern PFNGLBUFFERDATAPROC nglBufferData;
extern PFNGLBUFFERSUBDATAARBPROC nglBufferSubDataARB; extern PFNGLBUFFERSUBDATAPROC nglBufferSubData;
extern PFNGLGETBUFFERSUBDATAARBPROC nglGetBufferSubDataARB; extern PFNGLGETBUFFERSUBDATAPROC nglGetBufferSubData;
extern PFNGLMAPBUFFERARBPROC nglMapBufferARB; extern PFNGLMAPBUFFERPROC nglMapBuffer;
extern PFNGLUNMAPBUFFERARBPROC nglUnmapBufferARB; extern PFNGLUNMAPBUFFERPROC nglUnmapBuffer;
extern PFNGLGETBUFFERPARAMETERIVARBPROC nglGetBufferParameterivARB; extern PFNGLGETBUFFERPARAMETERIVPROC nglGetBufferParameteriv;
extern PFNGLGETBUFFERPOINTERVARBPROC nglGetBufferPointervARB; extern PFNGLGETBUFFERPOINTERVPROC nglGetBufferPointerv;

@ -1031,7 +1031,7 @@ void CDriverGLStates3::forceBindARBVertexBuffer(uint objectID)
{ {
H_AUTO_OGL(CDriverGLStates3_forceBindARBVertexBuffer) H_AUTO_OGL(CDriverGLStates3_forceBindARBVertexBuffer)
nglBindBufferARB(GL_ARRAY_BUFFER_ARB, objectID); nglBindBuffer(GL_ARRAY_BUFFER_ARB, objectID);
_CurrARBVertexBuffer = objectID; _CurrARBVertexBuffer = objectID;
} }

@ -77,20 +77,20 @@ IVertexBufferHardGL *CVertexArrayRange::createVBHardGL(uint size, CVertexBuffer
GLuint vertexBufferID; GLuint vertexBufferID;
glGetError(); glGetError();
nglGenBuffersARB(1, &vertexBufferID); nglGenBuffers(1, &vertexBufferID);
if (glGetError() != GL_NO_ERROR) return NULL; if (glGetError() != GL_NO_ERROR) return NULL;
_Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID); _Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID);
switch(_VBType) switch(_VBType)
{ {
case CVertexBuffer::AGPPreferred: case CVertexBuffer::AGPPreferred:
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferData(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
break; break;
case CVertexBuffer::StaticPreferred: case CVertexBuffer::StaticPreferred:
if (_Driver->getStaticMemoryToVRAM()) if (_Driver->getStaticMemoryToVRAM())
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB); nglBufferData(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB);
else else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferData(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
break; break;
default: default:
nlassert(0); nlassert(0);
@ -98,7 +98,7 @@ IVertexBufferHardGL *CVertexArrayRange::createVBHardGL(uint size, CVertexBuffer
} }
if (glGetError() != GL_NO_ERROR) if (glGetError() != GL_NO_ERROR)
{ {
nglDeleteBuffersARB(1, &vertexBufferID); nglDeleteBuffers(1, &vertexBufferID);
return NULL; return NULL;
} }
CVertexBufferHard *newVbHard= new CVertexBufferHard(_Driver, vb); CVertexBufferHard *newVbHard= new CVertexBufferHard(_Driver, vb);
@ -140,8 +140,8 @@ void CVertexArrayRange::updateLostBuffers()
{ {
nlassert((*it)->_VertexObjectId); nlassert((*it)->_VertexObjectId);
GLuint id = (GLuint) (*it)->_VertexObjectId; GLuint id = (GLuint) (*it)->_VertexObjectId;
nlassert(nglIsBufferARB(id)); nlassert(nglIsBuffer(id));
nglDeleteBuffersARB(1, &id); nglDeleteBuffers(1, &id);
(*it)->_VertexObjectId = 0; (*it)->_VertexObjectId = 0;
(*it)->VB->setLocation(CVertexBuffer::NotResident); (*it)->VB->setLocation(CVertexBuffer::NotResident);
} }
@ -184,8 +184,8 @@ CVertexBufferHard::~CVertexBufferHard()
if (_VertexObjectId) if (_VertexObjectId)
{ {
GLuint id = (GLuint) _VertexObjectId; GLuint id = (GLuint) _VertexObjectId;
nlassert(nglIsBufferARB(id)); nlassert(nglIsBuffer(id));
nglDeleteBuffersARB(1, &id); nglDeleteBuffers(1, &id);
} }
if (_VertexArrayRange) if (_VertexArrayRange)
{ {
@ -223,7 +223,7 @@ void *CVertexBufferHard::lock()
// recreate a vb // recreate a vb
GLuint vertexBufferID; GLuint vertexBufferID;
nglGenBuffersARB(1, &vertexBufferID); nglGenBuffers(1, &vertexBufferID);
if (glGetError() != GL_NO_ERROR) if (glGetError() != GL_NO_ERROR)
{ {
@ -235,13 +235,13 @@ void *CVertexBufferHard::lock()
switch(_MemType) switch(_MemType)
{ {
case CVertexBuffer::AGPPreferred: case CVertexBuffer::AGPPreferred:
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferData(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
break; break;
case CVertexBuffer::StaticPreferred: case CVertexBuffer::StaticPreferred:
if (_Driver->getStaticMemoryToVRAM()) if (_Driver->getStaticMemoryToVRAM())
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB); nglBufferData(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB);
else else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferData(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
break; break;
default: default:
nlassert(0); nlassert(0);
@ -250,7 +250,7 @@ void *CVertexBufferHard::lock()
if (glGetError() != GL_NO_ERROR) if (glGetError() != GL_NO_ERROR)
{ {
_Driver->incrementResetCounter(); _Driver->incrementResetCounter();
nglDeleteBuffersARB(1, &vertexBufferID); nglDeleteBuffers(1, &vertexBufferID);
return &_DummyVB[0];; return &_DummyVB[0];;
} }
_VertexObjectId = vertexBufferID; _VertexObjectId = vertexBufferID;
@ -268,11 +268,11 @@ void *CVertexBufferHard::lock()
_Driver->_DriverGLStates.bindARBVertexBuffer(_VertexObjectId); _Driver->_DriverGLStates.bindARBVertexBuffer(_VertexObjectId);
_VertexPtr = nglMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); _VertexPtr = nglMapBuffer(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
if (!_VertexPtr) if (!_VertexPtr)
{ {
nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); nglUnmapBuffer(GL_ARRAY_BUFFER_ARB);
nlassert(nglIsBufferARB((GLuint) _VertexObjectId)); nlassert(nglIsBuffer((GLuint) _VertexObjectId));
invalidate(); invalidate();
return &_DummyVB[0]; return &_DummyVB[0];
} }
@ -312,7 +312,7 @@ void CVertexBufferHard::unlock()
#endif #endif
GLboolean unmapOk = GL_FALSE; GLboolean unmapOk = GL_FALSE;
unmapOk = nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); unmapOk = nglUnmapBuffer(GL_ARRAY_BUFFER_ARB);
#ifdef NL_DEBUG #ifdef NL_DEBUG
_Unmapping = false; _Unmapping = false;

Loading…
Cancel
Save