Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencontext.h
Go to the documentation of this file.
00001 /* 00002 * Mesa 3-D graphics library 00003 * Version: 6.5.1 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 00025 00048 #ifndef CONTEXT_H 00049 #define CONTEXT_H 00050 00051 00052 #include "glapi/glapi.h" 00053 #include "imports.h" 00054 #include "mtypes.h" 00055 00056 00059 00060 extern GLvisual * 00061 _mesa_create_visual( GLboolean rgbFlag, 00062 GLboolean dbFlag, 00063 GLboolean stereoFlag, 00064 GLint redBits, 00065 GLint greenBits, 00066 GLint blueBits, 00067 GLint alphaBits, 00068 GLint indexBits, 00069 GLint depthBits, 00070 GLint stencilBits, 00071 GLint accumRedBits, 00072 GLint accumGreenBits, 00073 GLint accumBlueBits, 00074 GLint accumAlphaBits, 00075 GLint numSamples ); 00076 00077 extern GLboolean 00078 _mesa_initialize_visual( GLvisual *v, 00079 GLboolean rgbFlag, 00080 GLboolean dbFlag, 00081 GLboolean stereoFlag, 00082 GLint redBits, 00083 GLint greenBits, 00084 GLint blueBits, 00085 GLint alphaBits, 00086 GLint indexBits, 00087 GLint depthBits, 00088 GLint stencilBits, 00089 GLint accumRedBits, 00090 GLint accumGreenBits, 00091 GLint accumBlueBits, 00092 GLint accumAlphaBits, 00093 GLint numSamples ); 00094 00095 extern void 00096 _mesa_destroy_visual( GLvisual *vis ); 00097 00103 00104 extern GLcontext * 00105 _mesa_create_context( const GLvisual *visual, 00106 GLcontext *share_list, 00107 const struct dd_function_table *driverFunctions, 00108 void *driverContext ); 00109 00110 extern GLboolean 00111 _mesa_initialize_context( GLcontext *ctx, 00112 const GLvisual *visual, 00113 GLcontext *share_list, 00114 const struct dd_function_table *driverFunctions, 00115 void *driverContext ); 00116 00117 extern void 00118 _mesa_initialize_context_extra(GLcontext *ctx); 00119 00120 extern void 00121 _mesa_free_context_data( GLcontext *ctx ); 00122 00123 extern void 00124 _mesa_destroy_context( GLcontext *ctx ); 00125 00126 00127 extern void 00128 _mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask); 00129 00130 00131 extern void 00132 _mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer, 00133 GLframebuffer *readBuffer ); 00134 00135 extern GLboolean 00136 _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare); 00137 00138 extern GLcontext * 00139 _mesa_get_current_context(void); 00140 00144 extern void 00145 _mesa_notifySwapBuffers(__GLcontext *gc); 00146 00147 00148 extern struct _glapi_table * 00149 _mesa_get_dispatch(GLcontext *ctx); 00150 00151 00152 00155 00156 extern void 00157 _mesa_record_error( GLcontext *ctx, GLenum error ); 00158 00159 extern void GLAPIENTRY 00160 _mesa_Finish( void ); 00161 00162 extern void GLAPIENTRY 00163 _mesa_Flush( void ); 00164 00174 00185 #define FLUSH_VERTICES(ctx, newstate) \ 00186 do { \ 00187 if (MESA_VERBOSE & VERBOSE_STATE) \ 00188 _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);\ 00189 if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \ 00190 ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES); \ 00191 ctx->NewState |= newstate; \ 00192 } while (0) 00193 00204 #define FLUSH_CURRENT(ctx, newstate) \ 00205 do { \ 00206 if (MESA_VERBOSE & VERBOSE_STATE) \ 00207 _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION); \ 00208 if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \ 00209 ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \ 00210 ctx->NewState |= newstate; \ 00211 } while (0) 00212 00220 #define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \ 00221 do { \ 00222 if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \ 00223 _mesa_error(ctx, GL_INVALID_OPERATION, "Inside glBegin/glEnd"); \ 00224 return retval; \ 00225 } \ 00226 } while (0) 00227 00234 #define ASSERT_OUTSIDE_BEGIN_END(ctx) \ 00235 do { \ 00236 if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \ 00237 _mesa_error(ctx, GL_INVALID_OPERATION, "Inside glBegin/glEnd"); \ 00238 return; \ 00239 } \ 00240 } while (0) 00241 00248 #define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx) \ 00249 do { \ 00250 ASSERT_OUTSIDE_BEGIN_END(ctx); \ 00251 FLUSH_VERTICES(ctx, 0); \ 00252 } while (0) 00253 00261 #define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval) \ 00262 do { \ 00263 ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval); \ 00264 FLUSH_VERTICES(ctx, 0); \ 00265 } while (0) 00266 00274 #define NEED_SECONDARY_COLOR(CTX) \ 00275 (((CTX)->Light.Enabled && \ 00276 (CTX)->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) \ 00277 || (CTX)->Fog.ColorSumEnabled \ 00278 || ((CTX)->VertexProgram._Current && \ 00279 ((CTX)->VertexProgram._Current != (CTX)->VertexProgram._TnlProgram) && \ 00280 ((CTX)->VertexProgram._Current->Base.InputsRead & VERT_BIT_COLOR1)) \ 00281 || ((CTX)->FragmentProgram._Current && \ 00282 ((CTX)->FragmentProgram._Current != (CTX)->FragmentProgram._TexEnvProgram) && \ 00283 ((CTX)->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL1)) \ 00284 ) 00285 00286 00290 #define RGBA_LOGICOP_ENABLED(CTX) \ 00291 ((CTX)->Color.ColorLogicOpEnabled || \ 00292 ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP)) 00293 00294 00295 #endif /* CONTEXT_H */ Generated on Sun May 27 2012 04:20:11 for ReactOS by
1.7.6.1
|