-# $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
offset 696
name MapBufferARB
-return void
+return void *
param target GLenum
param access GLenum
category GL_ARB_vertex_buffer_object
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 */
};
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)
}
}
-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:
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(access)");
- return;
+ return NULL;
}
if (target == GL_ARRAY_BUFFER_ARB) {
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(target)");
- return;
+ return NULL;
}
+
+ return NULL;
}
GLboolean
-/* $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
extern void
_mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data);
-extern void
+extern void *
_mesa_MapBufferARB(GLenum target, GLenum access);
GLboolean