1848b8605Smrg/* 2848b8605Smrg * mesa 3-D graphics library 3848b8605Smrg * 4848b8605Smrg * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 5848b8605Smrg * 6848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 7848b8605Smrg * copy of this software and associated documentation files (the "Software"), 8848b8605Smrg * to deal in the Software without restriction, including without limitation 9848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the 11848b8605Smrg * Software is furnished to do so, subject to the following conditions: 12848b8605Smrg * 13848b8605Smrg * The above copyright notice and this permission notice shall be included 14848b8605Smrg * in all copies or substantial portions of the Software. 15848b8605Smrg * 16848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20848b8605Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21848b8605Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22848b8605Smrg * OTHER DEALINGS IN THE SOFTWARE. 23848b8605Smrg */ 24848b8605Smrg 25848b8605Smrg/** 26b8e80941Smrg * \brief Public interface to the VBO module 27848b8605Smrg * \author Keith Whitwell 28848b8605Smrg */ 29848b8605Smrg 30848b8605Smrg 31848b8605Smrg#ifndef _VBO_H 32848b8605Smrg#define _VBO_H 33848b8605Smrg 34848b8605Smrg#include <stdbool.h> 35848b8605Smrg#include "main/glheader.h" 36b8e80941Smrg#include "main/draw.h" 37b8e80941Smrg 38b8e80941Smrg#ifdef __cplusplus 39b8e80941Smrgextern "C" { 40b8e80941Smrg#endif 41848b8605Smrg 42848b8605Smrgstruct gl_context; 43848b8605Smrg 44b8e80941SmrgGLboolean 45b8e80941Smrg_vbo_CreateContext(struct gl_context *ctx); 46848b8605Smrg 47b8e80941Smrgvoid 48b8e80941Smrg_vbo_DestroyContext(struct gl_context *ctx); 49848b8605Smrg 50b8e80941Smrgvoid 51b8e80941Smrgvbo_exec_invalidate_state(struct gl_context *ctx); 52848b8605Smrg 53b8e80941Smrgvoid 54b8e80941Smrg_vbo_install_exec_vtxfmt(struct gl_context *ctx); 55848b8605Smrg 56848b8605Smrgvoid 57848b8605Smrgvbo_initialize_exec_dispatch(const struct gl_context *ctx, 58848b8605Smrg struct _glapi_table *exec); 59848b8605Smrg 60848b8605Smrgvoid 61848b8605Smrgvbo_initialize_save_dispatch(const struct gl_context *ctx, 62848b8605Smrg struct _glapi_table *exec); 63848b8605Smrg 64b8e80941Smrgvoid 65b8e80941Smrgvbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags); 66848b8605Smrg 67b8e80941Smrgvoid 68b8e80941Smrgvbo_save_SaveFlushVertices(struct gl_context *ctx); 69848b8605Smrg 70b8e80941Smrgvoid 71b8e80941Smrgvbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode, 72b8e80941Smrg bool no_current_update); 73848b8605Smrg 74b8e80941Smrgvoid 75b8e80941Smrgvbo_save_NewList(struct gl_context *ctx, GLuint list, GLenum mode); 76848b8605Smrg 77b8e80941Smrgvoid 78b8e80941Smrgvbo_save_EndList(struct gl_context *ctx); 79848b8605Smrg 80b8e80941Smrgvoid 81b8e80941Smrgvbo_save_BeginCallList(struct gl_context *ctx, struct gl_display_list *list); 82848b8605Smrg 83b8e80941Smrgvoid 84b8e80941Smrgvbo_save_EndCallList(struct gl_context *ctx); 85848b8605Smrg 86848b8605Smrg 87b8e80941Smrgvoid 88b8e80941Smrgvbo_delete_minmax_cache(struct gl_buffer_object *bufferObj); 89848b8605Smrg 90848b8605Smrgvoid 91848b8605Smrgvbo_get_minmax_indices(struct gl_context *ctx, const struct _mesa_prim *prim, 92848b8605Smrg const struct _mesa_index_buffer *ib, 93848b8605Smrg GLuint *min_index, GLuint *max_index, GLuint nr_prims); 94848b8605Smrg 95848b8605Smrgvoid 96b8e80941Smrgvbo_use_buffer_objects(struct gl_context *ctx); 97848b8605Smrg 98848b8605Smrgvoid 99b8e80941Smrgvbo_always_unmap_buffers(struct gl_context *ctx); 100848b8605Smrg 101848b8605Smrgvoid 102848b8605Smrgvbo_sw_primitive_restart(struct gl_context *ctx, 103848b8605Smrg const struct _mesa_prim *prim, 104848b8605Smrg GLuint nr_prims, 105848b8605Smrg const struct _mesa_index_buffer *ib, 106848b8605Smrg struct gl_buffer_object *indirect); 107848b8605Smrg 108b8e80941Smrg 109b8e80941Smrgconst struct gl_array_attributes* 110b8e80941Smrg_vbo_current_attrib(const struct gl_context *ctx, gl_vert_attrib attr); 111b8e80941Smrg 112b8e80941Smrg 113b8e80941Smrgconst struct gl_vertex_buffer_binding* 114b8e80941Smrg_vbo_current_binding(const struct gl_context *ctx); 115b8e80941Smrg 116b8e80941Smrg 117848b8605Smrgvoid GLAPIENTRY 118848b8605Smrg_es_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a); 119848b8605Smrg 120848b8605Smrgvoid GLAPIENTRY 121848b8605Smrg_es_Normal3f(GLfloat x, GLfloat y, GLfloat z); 122848b8605Smrg 123848b8605Smrgvoid GLAPIENTRY 124848b8605Smrg_es_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); 125848b8605Smrg 126848b8605Smrgvoid GLAPIENTRY 127848b8605Smrg_es_Materialfv(GLenum face, GLenum pname, const GLfloat *params); 128848b8605Smrg 129848b8605Smrgvoid GLAPIENTRY 130848b8605Smrg_es_Materialf(GLenum face, GLenum pname, GLfloat param); 131848b8605Smrg 132848b8605Smrgvoid GLAPIENTRY 133848b8605Smrg_es_VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 134848b8605Smrg 135848b8605Smrgvoid GLAPIENTRY 136848b8605Smrg_es_VertexAttrib1f(GLuint indx, GLfloat x); 137848b8605Smrg 138848b8605Smrgvoid GLAPIENTRY 139848b8605Smrg_es_VertexAttrib1fv(GLuint indx, const GLfloat* values); 140848b8605Smrg 141848b8605Smrgvoid GLAPIENTRY 142848b8605Smrg_es_VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); 143848b8605Smrg 144848b8605Smrgvoid GLAPIENTRY 145848b8605Smrg_es_VertexAttrib2fv(GLuint indx, const GLfloat* values); 146848b8605Smrg 147848b8605Smrgvoid GLAPIENTRY 148848b8605Smrg_es_VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); 149848b8605Smrg 150848b8605Smrgvoid GLAPIENTRY 151848b8605Smrg_es_VertexAttrib3fv(GLuint indx, const GLfloat* values); 152848b8605Smrg 153848b8605Smrgvoid GLAPIENTRY 154848b8605Smrg_es_VertexAttrib4fv(GLuint indx, const GLfloat* values); 155848b8605Smrg 156b8e80941Smrg#ifdef __cplusplus 157b8e80941Smrg} // extern "C" 158b8e80941Smrg#endif 159b8e80941Smrg 160848b8605Smrg#endif 161