diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mesa/glapi/APIspec | 4 | ||||
| -rw-r--r-- | src/mesa/glapi/glapitable.h | 2 | ||||
| -rw-r--r-- | src/mesa/glapi/glapitemp.h | 4 | ||||
| -rw-r--r-- | src/mesa/main/bufferobj.c | 10 | ||||
| -rw-r--r-- | src/mesa/main/bufferobj.h | 4 | 
5 files changed, 13 insertions, 11 deletions
diff --git a/src/mesa/glapi/APIspec b/src/mesa/glapi/APIspec index 0d4a29e3e2..5075eaf035 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 bd51c8aad2..2bb31e2e0d 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 3df11a5973..707333043d 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 3a7a413e97..f384402219 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 2617eb0c3e..3f4cd20621 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  | 
