Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenvbo_context.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 00051 #ifndef _VBO_CONTEXT_H 00052 #define _VBO_CONTEXT_H 00053 00054 #include "vbo.h" 00055 #include "vbo_attrib.h" 00056 #include "vbo_exec.h" 00057 #if FEATURE_dlist 00058 #include "vbo_save.h" 00059 #endif 00060 00061 00062 struct vbo_context { 00063 struct gl_client_array currval[VBO_ATTRIB_MAX]; 00064 00065 /* These point into the above. TODO: remove. 00066 */ 00067 struct gl_client_array *legacy_currval; 00068 struct gl_client_array *generic_currval; 00069 struct gl_client_array *mat_currval; 00070 00071 GLuint map_vp_none[32]; 00072 GLuint map_vp_arb[32]; 00073 00074 GLfloat *current[VBO_ATTRIB_MAX]; /* points into ctx->Current, ctx->Light.Material */ 00075 GLfloat CurrentFloatEdgeFlag; 00076 00077 00078 struct vbo_exec_context exec; 00079 #if FEATURE_dlist 00080 struct vbo_save_context save; 00081 #endif 00082 00083 /* Callback into the driver. This must always succeed, the driver 00084 * is responsible for initiating any fallback actions required: 00085 */ 00086 vbo_draw_func draw_prims; 00087 }; 00088 00089 00090 static INLINE struct vbo_context *vbo_context(GLcontext *ctx) 00091 { 00092 return (struct vbo_context *)(ctx->swtnl_im); 00093 } 00094 00095 enum { 00096 VP_NONE = 1, 00097 VP_NV, 00098 VP_ARB 00099 }; 00100 00101 static INLINE GLuint get_program_mode( GLcontext *ctx ) 00102 { 00103 if (!ctx->VertexProgram._Current) 00104 return VP_NONE; 00105 else if (ctx->VertexProgram._Current->IsNVProgram) 00106 return VP_NV; 00107 else 00108 return VP_ARB; 00109 } 00110 00111 00112 #endif Generated on Thu May 24 2012 04:21:02 for ReactOS by
1.7.6.1
|