fix MapBufferARB() return type

This commit is contained in:
Brian Paul
2003-05-10 04:35:09 +00:00
parent baa42c3364
commit ea31ca4720
5 changed files with 13 additions and 11 deletions

View File

@@ -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

View File

@@ -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 */
};

View File

@@ -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)

View File

@@ -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

View File

@@ -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