Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenvbo.h
Go to the documentation of this file.
00001 /* 00002 * mesa 3-D graphics library 00003 * Version: 6.5 00004 * 00005 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining a 00008 * copy of this software and associated documentation files (the "Software"), 00009 * to deal in the Software without restriction, including without limitation 00010 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00011 * and/or sell copies of the Software, and to permit persons to whom the 00012 * Software is furnished to do so, subject to the following conditions: 00013 * 00014 * The above copyright notice and this permission notice shall be included 00015 * in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00018 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00019 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00020 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00021 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00022 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00023 */ 00024 00032 #ifndef _VBO_H 00033 #define _VBO_H 00034 00035 #include "main/mtypes.h" 00036 00037 struct _mesa_prim { 00038 GLuint mode:8; 00039 GLuint indexed:1; 00040 GLuint begin:1; 00041 GLuint end:1; 00042 GLuint weak:1; 00043 GLuint pad:20; 00044 00045 GLuint start; 00046 GLuint count; 00047 }; 00048 00049 /* Would like to call this a "vbo_index_buffer", but this would be 00050 * confusing as the indices are not neccessarily yet in a non-null 00051 * buffer object. 00052 */ 00053 struct _mesa_index_buffer { 00054 GLuint count; 00055 GLenum type; 00056 struct gl_buffer_object *obj; 00057 const void *ptr; 00058 }; 00059 00060 00061 00062 GLboolean _vbo_CreateContext( GLcontext *ctx ); 00063 void _vbo_DestroyContext( GLcontext *ctx ); 00064 void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state ); 00065 00066 00067 typedef void (*vbo_draw_func)( GLcontext *ctx, 00068 const struct gl_client_array **arrays, 00069 const struct _mesa_prim *prims, 00070 GLuint nr_prims, 00071 const struct _mesa_index_buffer *ib, 00072 GLuint min_index, 00073 GLuint max_index ); 00074 00075 00076 00077 00078 /* Utility function to cope with various constraints on tnl modules or 00079 * hardware. This can be used to split an incoming set of arrays and 00080 * primitives against the following constraints: 00081 * - Maximum number of indices in index buffer. 00082 * - Maximum number of vertices referenced by index buffer. 00083 * - Maximum hardware vertex buffer size. 00084 */ 00085 struct split_limits { 00086 GLuint max_verts; 00087 GLuint max_indices; 00088 GLuint max_vb_size; /* bytes */ 00089 }; 00090 00091 00092 void vbo_split_prims( GLcontext *ctx, 00093 const struct gl_client_array *arrays[], 00094 const struct _mesa_prim *prim, 00095 GLuint nr_prims, 00096 const struct _mesa_index_buffer *ib, 00097 GLuint min_index, 00098 GLuint max_index, 00099 vbo_draw_func draw, 00100 const struct split_limits *limits ); 00101 00102 00103 /* Helpers for dealing translating away non-zero min_index. 00104 */ 00105 GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] ); 00106 00107 void vbo_rebase_prims( GLcontext *ctx, 00108 const struct gl_client_array *arrays[], 00109 const struct _mesa_prim *prim, 00110 GLuint nr_prims, 00111 const struct _mesa_index_buffer *ib, 00112 GLuint min_index, 00113 GLuint max_index, 00114 vbo_draw_func draw ); 00115 00116 00117 void vbo_use_buffer_objects(GLcontext *ctx); 00118 00119 00120 #endif Generated on Sun May 27 2012 04:20:48 for ReactOS by
1.7.6.1
|