summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-05-10 04:35:09 +0000
committerBrian Paul <[email protected]>2003-05-10 04:35:09 +0000
commitea31ca47200d96b7cc687989ee7f9953819fddbb (patch)
treef6ecd2c249a274e098346760b0a5fcc3b8d8132a
parentbaa42c3364b58a7eaf08856c7d213d9ae0e3b021 (diff)
fix MapBufferARB() return type
-rw-r--r--src/mesa/glapi/APIspec4
-rw-r--r--src/mesa/glapi/glapitable.h2
-rw-r--r--src/mesa/glapi/glapitemp.h4
-rw-r--r--src/mesa/main/bufferobj.c10
-rw-r--r--src/mesa/main/bufferobj.h4
5 files changed, 13 insertions, 11 deletions
diff --git a/src/mesa/glapi/APIspec b/src/mesa/glapi/APIspec
index 0d4a29e3e28..5075eaf0359 100644
--- a/src/mesa/glapi/APIspec
+++ b/src/mesa/glapi/APIspec
@@ -1,4 +1,4 @@
-# $Id: APIspec,v 1.16 2003/04/21 14:53:40 brianp Exp $
+# $Id: APIspec,v 1.17 2003/05/10 04:35:36 brianp Exp $
# This file describes all the OpenGL functions.
# We use a number of Python scripts to parse this file and
@@ -8321,7 +8321,7 @@ category GL_ARB_vertex_buffer_object
offset 696
name MapBufferARB
-return void
+return void *
param target GLenum
param access GLenum
category GL_ARB_vertex_buffer_object
diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h
index bd51c8aad2b..2bb31e2e0db 100644
--- a/src/mesa/glapi/glapitable.h
+++ b/src/mesa/glapi/glapitable.h
@@ -703,7 +703,7 @@ struct _glapi_table
void (*GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 694 */
void (*GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data); /* 695 */
GLboolean (*IsBufferARB)(GLuint buffer); /* 696 */
- void (*MapBufferARB)(GLenum target, GLenum access); /* 697 */
+ void * (*MapBufferARB)(GLenum target, GLenum access); /* 697 */
GLboolean (*UnmapBufferARB)(GLenum target); /* 698 */
void (*DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 699 */
};
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index 3df11a5973d..707333043dc 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -4609,9 +4609,9 @@ KEYWORD1 GLboolean KEYWORD2 NAME(IsBufferARB)(GLuint buffer)
RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBufferARB(%d);\n", buffer));
}
-KEYWORD1 void KEYWORD2 NAME(MapBufferARB)(GLenum target, GLenum access)
+KEYWORD1 void * KEYWORD2 NAME(MapBufferARB)(GLenum target, GLenum access)
{
- DISPATCH(MapBufferARB, (target, access), (F, "glMapBufferARB(0x%x, 0x%x);\n", target, access));
+ RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBufferARB(0x%x, 0x%x);\n", target, access));
}
KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferARB)(GLenum target)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 3a7a413e973..f3844022195 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -174,11 +174,11 @@ _mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset,
}
}
-void
+void *
_mesa_MapBufferARB(GLenum target, GLenum access)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
switch (access) {
case GL_READ_ONLY_ARB:
@@ -188,7 +188,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(access)");
- return;
+ return NULL;
}
if (target == GL_ARRAY_BUFFER_ARB) {
@@ -199,8 +199,10 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(target)");
- return;
+ return NULL;
}
+
+ return NULL;
}
GLboolean
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 2617eb0c3e2..3f4cd206211 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -1,4 +1,4 @@
-/* $Id: bufferobj.h,v 1.1 2003/03/29 17:01:00 brianp Exp $ */
+/* $Id: bufferobj.h,v 1.2 2003/05/10 04:35:09 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -51,7 +51,7 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, co
extern void
_mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data);
-extern void
+extern void *
_mesa_MapBufferARB(GLenum target, GLenum access);
GLboolean