ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

glapi.h
Go to the documentation of this file.
00001 /*
00002  * Mesa 3-D graphics library
00003  * Version:  7.1
00004  *
00005  * Copyright (C) 1999-2008  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 
00044 #ifndef _GLAPI_H
00045 #define _GLAPI_H
00046 
00047 #define GL_GLEXT_PROTOTYPES
00048 
00049 #include "GL/gl.h"
00050 #include "GL/glext.h"
00051 #include "glthread.h"
00052 
00053 
00054 struct _glapi_table;
00055 
00056 typedef void (*_glapi_proc)(void); /* generic function pointer */
00057 
00058 typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
00059 
00060 
00061 #if defined(USE_MGL_NAMESPACE)
00062 #define _glapi_set_dispatch _mglapi_set_dispatch
00063 #define _glapi_get_dispatch _mglapi_get_dispatch
00064 #define _glapi_set_context _mglapi_set_context
00065 #define _glapi_get_context _mglapi_get_context
00066 #define _glapi_Context _mglapi_Context
00067 #define _glapi_Dispatch _mglapi_Dispatch
00068 #endif
00069 
00070 
00071 /*
00072  * Number of extension functions which we can dynamically add at runtime.
00073  */
00074 #define MAX_EXTENSION_FUNCS 300
00075 
00076 
00081 #if defined (GLX_USE_TLS)
00082 
00083 const extern void *_glapi_Context;
00084 const extern struct _glapi_table *_glapi_Dispatch;
00085 
00086 extern __thread void * _glapi_tls_Context
00087     __attribute__((tls_model("initial-exec")));
00088 
00089 # define GET_CURRENT_CONTEXT(C)  GLcontext *C = (GLcontext *) _glapi_tls_Context
00090 
00091 #else
00092 
00093 extern void *_glapi_Context;
00094 extern struct _glapi_table *_glapi_Dispatch;
00095 
00096 # ifdef THREADS
00097 #  define GET_CURRENT_CONTEXT(C)  GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
00098 # else
00099 #  define GET_CURRENT_CONTEXT(C)  GLcontext *C = (GLcontext *) _glapi_Context
00100 # endif
00101 
00102 #endif /* defined (GLX_USE_TLS) */
00103 
00104 
00109 extern void
00110 _glapi_noop_enable_warnings(GLboolean enable);
00111 
00112 extern void
00113 _glapi_set_warning_func(_glapi_warning_func func);
00114 
00115 extern void
00116 _glapi_check_multithread(void);
00117 
00118 
00119 extern void
00120 _glapi_set_context(void *context);
00121 
00122 
00123 extern void *
00124 _glapi_get_context(void);
00125 
00126 
00127 extern void
00128 _glapi_set_dispatch(struct _glapi_table *dispatch);
00129 
00130 
00131 extern struct _glapi_table *
00132 _glapi_get_dispatch(void);
00133 
00134 
00135 extern int
00136 _glapi_begin_dispatch_override(struct _glapi_table *override);
00137 
00138 
00139 extern void
00140 _glapi_end_dispatch_override(int layer);
00141 
00142 
00143 struct _glapi_table *
00144 _glapi_get_override_dispatch(int layer);
00145 
00146 
00147 extern GLuint
00148 _glapi_get_dispatch_table_size(void);
00149 
00150 
00151 extern void
00152 _glapi_check_table(const struct _glapi_table *table);
00153 
00154 
00155 extern int
00156 _glapi_add_dispatch( const char * const * function_names,
00157              const char * parameter_signature );
00158 
00159 extern GLint
00160 _glapi_get_proc_offset(const char *funcName);
00161 
00162 
00163 extern _glapi_proc
00164 _glapi_get_proc_address(const char *funcName);
00165 
00166 
00167 extern const char *
00168 _glapi_get_proc_name(GLuint offset);
00169 
00170 
00171 #endif

Generated on Sat May 26 2012 04:18:45 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.