Basic infrastructure for GL_ARB_vertex_buffer_object.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.X11,v 1.75 2003/03/25 02:26:29 brianp Exp $
|
# $Id: Makefile.X11,v 1.76 2003/03/29 17:01:02 brianp Exp $
|
||||||
|
|
||||||
# Mesa 3-D graphics library
|
# Mesa 3-D graphics library
|
||||||
# Version: 5.0
|
# Version: 5.0
|
||||||
@@ -28,6 +28,8 @@ CORE_SOURCES = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
@@ -63,6 +63,7 @@ MESA_CORE_SRCS = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# Mesa 3-D graphics library
|
# Mesa 3-D graphics library
|
||||||
# Version: 4.1
|
# Version: 5.1
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
|
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -105,6 +105,7 @@ CORE_SOURCES = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# $Id: Makefile.OSMesa16,v 1.13 2003/03/25 02:26:29 brianp Exp $
|
# $Id: Makefile.OSMesa16,v 1.14 2003/03/29 17:01:02 brianp Exp $
|
||||||
|
|
||||||
# Mesa 3-D graphics library
|
# Mesa 3-D graphics library
|
||||||
# Version: 5.0
|
# Version: 5.1
|
||||||
# Copyright (C) 1995-2002 Brian Paul
|
# Copyright (C) 1995-2003 Brian Paul
|
||||||
|
|
||||||
# Makefile for building Mesa for 16/32-bit/channel rendering with the OSMesa
|
# Makefile for building Mesa for 16/32-bit/channel rendering with the OSMesa
|
||||||
# driver.
|
# driver.
|
||||||
@@ -29,6 +29,7 @@ CORE_SOURCES = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.X11,v 1.75 2003/03/25 02:26:29 brianp Exp $
|
# $Id: Makefile.X11,v 1.76 2003/03/29 17:01:02 brianp Exp $
|
||||||
|
|
||||||
# Mesa 3-D graphics library
|
# Mesa 3-D graphics library
|
||||||
# Version: 5.0
|
# Version: 5.0
|
||||||
@@ -28,6 +28,8 @@ CORE_SOURCES = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
@@ -58,6 +58,7 @@ GL_SOURCES = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
@@ -18,6 +18,7 @@ CORE_SRCS = \
|
|||||||
accum.c \
|
accum.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
|
98
src/mesa/main/bufferobj.c
Normal file
98
src/mesa/main/bufferobj.c
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
/* $Id: bufferobj.c,v 1.1 2003/03/29 17:01:00 brianp Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mesa 3-D graphics library
|
||||||
|
* Version: 5.1
|
||||||
|
*
|
||||||
|
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file bufferobj.c
|
||||||
|
* \brief Functions for the GL_ARB_vertex_buffer_object extension.
|
||||||
|
* \author Brian Paul
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "glheader.h"
|
||||||
|
#include "imports.h"
|
||||||
|
#include "bufferobj.h"
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_BindBufferARB(GLenum target, GLuint buffer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_DeleteBuffersARB(GLsizei n, const GLuint * buffer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_GenBuffersARB(GLsizei n, GLuint * buffer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GLboolean
|
||||||
|
_mesa_IsBufferARB(GLuint buffer)
|
||||||
|
{
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
|
||||||
|
const GLvoid * data, GLenum usage)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
|
||||||
|
GLsizeiptrARB size, const GLvoid * data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset,
|
||||||
|
GLsizeiptrARB size, void * data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_MapBufferARB(GLenum target, GLenum access)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GLboolean
|
||||||
|
_mesa_UnmapBufferARB(GLenum target)
|
||||||
|
{
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params)
|
||||||
|
{
|
||||||
|
}
|
66
src/mesa/main/bufferobj.h
Normal file
66
src/mesa/main/bufferobj.h
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/* $Id: bufferobj.h,v 1.1 2003/03/29 17:01:00 brianp Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mesa 3-D graphics library
|
||||||
|
* Version: 5.1
|
||||||
|
*
|
||||||
|
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef BUFFEROBJ_H
|
||||||
|
#define BUFFEROBJ_H
|
||||||
|
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_BindBufferARB(GLenum target, GLuint buffer);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_DeleteBuffersARB(GLsizei n, const GLuint * buffer);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_GenBuffersARB(GLsizei n, GLuint * buffer);
|
||||||
|
|
||||||
|
GLboolean
|
||||||
|
_mesa_IsBufferARB(GLuint buffer);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_BufferDataARB(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_BufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_MapBufferARB(GLenum target, GLenum access);
|
||||||
|
|
||||||
|
GLboolean
|
||||||
|
_mesa_UnmapBufferARB(GLenum target);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params);
|
||||||
|
|
||||||
|
#endif
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: config.h,v 1.44 2003/02/25 19:30:59 brianp Exp $ */
|
/* $Id: config.h,v 1.45 2003/03/29 17:01:03 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -228,5 +228,6 @@
|
|||||||
|
|
||||||
#define FEATURE_NV_fragment_program 1
|
#define FEATURE_NV_fragment_program 1
|
||||||
|
|
||||||
|
#define FEATURE_ARB_vertex_buffer_object 1
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
@@ -21,6 +21,7 @@ CORE_SOURCES =accum.c \
|
|||||||
api_validate.c \
|
api_validate.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
|
bufferobj.c \
|
||||||
buffers.c \
|
buffers.c \
|
||||||
clip.c \
|
clip.c \
|
||||||
colortab.c \
|
colortab.c \
|
||||||
@@ -90,6 +91,7 @@ RASTER_SOURCES = [.swrast]s_aatriangle.c \
|
|||||||
[.swrast]s_alphabuf.c \
|
[.swrast]s_alphabuf.c \
|
||||||
[.swrast]s_bitmap.c \
|
[.swrast]s_bitmap.c \
|
||||||
[.swrast]s_blend.c \
|
[.swrast]s_blend.c \
|
||||||
|
[.swrast]s_bufferobj.c \
|
||||||
[.swrast]s_buffers.c \
|
[.swrast]s_buffers.c \
|
||||||
[.swrast]s_copypix.c \
|
[.swrast]s_copypix.c \
|
||||||
[.swrast]s_context.c \
|
[.swrast]s_context.c \
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: extensions.c,v 1.88 2003/01/21 21:47:49 brianp Exp $ */
|
/* $Id: extensions.c,v 1.89 2003/03/29 17:01:01 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -67,6 +67,7 @@ static struct {
|
|||||||
{ OFF, "GL_ARB_texture_env_dot3", F(ARB_texture_env_dot3) },
|
{ OFF, "GL_ARB_texture_env_dot3", F(ARB_texture_env_dot3) },
|
||||||
{ OFF, "GL_ARB_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
|
{ OFF, "GL_ARB_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
|
||||||
{ ON, "GL_ARB_transpose_matrix", 0 },
|
{ ON, "GL_ARB_transpose_matrix", 0 },
|
||||||
|
{ OFF, "GL_ARB_vertex_buffer_object", F(ARB_vertex_buffer_object) },
|
||||||
{ ON, "GL_ARB_window_pos", F(ARB_window_pos) },
|
{ ON, "GL_ARB_window_pos", F(ARB_window_pos) },
|
||||||
{ OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
|
{ OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
|
||||||
{ OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
|
{ OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: mtypes.h,v 1.107 2003/03/19 05:34:24 brianp Exp $ */
|
/* $Id: mtypes.h,v 1.108 2003/03/29 17:01:00 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -1402,6 +1402,7 @@ struct gl_extensions {
|
|||||||
GLboolean ARB_texture_env_crossbar;
|
GLboolean ARB_texture_env_crossbar;
|
||||||
GLboolean ARB_texture_env_dot3;
|
GLboolean ARB_texture_env_dot3;
|
||||||
GLboolean ARB_texture_mirrored_repeat;
|
GLboolean ARB_texture_mirrored_repeat;
|
||||||
|
GLboolean ARB_vertex_buffer_object;
|
||||||
GLboolean ARB_window_pos;
|
GLboolean ARB_window_pos;
|
||||||
GLboolean ATI_texture_mirror_once;
|
GLboolean ATI_texture_mirror_once;
|
||||||
GLboolean ATI_texture_env_combine3;
|
GLboolean ATI_texture_env_combine3;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: state.c,v 1.101 2003/03/29 16:37:07 brianp Exp $ */
|
/* $Id: state.c,v 1.102 2003/03/29 17:01:01 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file manages recalculation of derived values in the
|
* /brief This file manages recalculation of derived values in the
|
||||||
* __GLcontext.
|
* __GLcontext. Also, this is where we initialize the API dispatch table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -36,6 +36,9 @@
|
|||||||
#include "api_loopback.h"
|
#include "api_loopback.h"
|
||||||
#include "attrib.h"
|
#include "attrib.h"
|
||||||
#include "blend.h"
|
#include "blend.h"
|
||||||
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
|
#include "bufferobj.h"
|
||||||
|
#endif
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "clip.h"
|
#include "clip.h"
|
||||||
#include "colortab.h"
|
#include "colortab.h"
|
||||||
@@ -550,6 +553,21 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
|
|||||||
|
|
||||||
/* ARB 14. GL_ARB_point_parameters */
|
/* ARB 14. GL_ARB_point_parameters */
|
||||||
/* reuse EXT_point_parameters functions */
|
/* reuse EXT_point_parameters functions */
|
||||||
|
|
||||||
|
/* ARB 28. GL_ARB_vertex_buffer_object */
|
||||||
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
|
exec->BindBufferARB = _mesa_BindBufferARB;
|
||||||
|
exec->DeleteBuffersARB = _mesa_DeleteBuffersARB;
|
||||||
|
exec->GenBuffersARB = _mesa_GenBuffersARB;
|
||||||
|
exec->IsBufferARB = _mesa_IsBufferARB;
|
||||||
|
exec->BufferDataARB = _mesa_BufferDataARB;
|
||||||
|
exec->BufferSubDataARB = _mesa_BufferSubDataARB;
|
||||||
|
exec->GetBufferSubDataARB = _mesa_GetBufferSubDataARB;
|
||||||
|
exec->MapBufferARB = _mesa_MapBufferARB;
|
||||||
|
exec->UnmapBufferARB = _mesa_UnmapBufferARB;
|
||||||
|
exec->GetBufferParameterivARB = _mesa_GetBufferParameterivARB;
|
||||||
|
exec->GetBufferPointervARB = _mesa_GetBufferPointervARB;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user