ReactOS 0.4.15-dev-7089-gea8a49d
context.h File Reference
#include "types.h"
Include dependency graph for context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GLvisualgl_create_visual (GLboolean rgb_flag, GLboolean alpha_flag, GLboolean db_flag, GLint depth_bits, GLint stencil_bits, GLint accum_bits, GLint index_bits, GLfloat red_scale, GLfloat green_scale, GLfloat blue_scale, GLfloat alpha_scale, GLint red_bits, GLint green_bits, GLint blue_bits, GLint alpha_bits)
 
void gl_destroy_visual (GLvisual *vis)
 
GLcontextgl_create_context (GLvisual *visual, GLcontext *share_list, void *driver_ctx)
 
void gl_destroy_context (GLcontext *ctx)
 
GLframebuffergl_create_framebuffer (GLvisual *visual)
 
void gl_destroy_framebuffer (GLframebuffer *buffer)
 
void gl_make_current (GLcontext *ctx, GLframebuffer *buffer)
 
GLcontextgl_get_current_context (void)
 
void gl_copy_context (const GLcontext *src, GLcontext *dst, GLuint mask)
 
void gl_set_api_table (GLcontext *ctx, const struct gl_api_table *api)
 
void gl_ResizeBuffersMESA (GLcontext *ctx)
 
void gl_problem (const GLcontext *ctx, const char *s)
 
void gl_warning (const GLcontext *ctx, const char *s)
 
void gl_error (GLcontext *ctx, GLenum error, const char *s)
 
GLenum gl_GetError (GLcontext *ctx)
 
void gl_update_state (GLcontext *ctx)
 

Variables

GLcontextCC
 

Function Documentation

◆ gl_copy_context()

void gl_copy_context ( const GLcontext src,
GLcontext dst,
GLuint  mask 
)

Definition at line 1293 of file context.c.

1294{
1295 if (mask & GL_ACCUM_BUFFER_BIT) {
1296 MEMCPY( &dst->Accum, &src->Accum, sizeof(struct gl_accum_attrib) );
1297 }
1298 if (mask & GL_COLOR_BUFFER_BIT) {
1299 MEMCPY( &dst->Color, &src->Color, sizeof(struct gl_colorbuffer_attrib) );
1300 }
1301 if (mask & GL_CURRENT_BIT) {
1302 MEMCPY( &dst->Current, &src->Current, sizeof(struct gl_current_attrib) );
1303 }
1304 if (mask & GL_DEPTH_BUFFER_BIT) {
1305 MEMCPY( &dst->Depth, &src->Depth, sizeof(struct gl_depthbuffer_attrib) );
1306 }
1307 if (mask & GL_ENABLE_BIT) {
1308 /* no op */
1309 }
1310 if (mask & GL_EVAL_BIT) {
1311 MEMCPY( &dst->Eval, &src->Eval, sizeof(struct gl_eval_attrib) );
1312 }
1313 if (mask & GL_FOG_BIT) {
1314 MEMCPY( &dst->Fog, &src->Fog, sizeof(struct gl_fog_attrib) );
1315 }
1316 if (mask & GL_HINT_BIT) {
1317 MEMCPY( &dst->Hint, &src->Hint, sizeof(struct gl_hint_attrib) );
1318 }
1319 if (mask & GL_LIGHTING_BIT) {
1320 MEMCPY( &dst->Light, &src->Light, sizeof(struct gl_light_attrib) );
1321 }
1322 if (mask & GL_LINE_BIT) {
1323 MEMCPY( &dst->Line, &src->Line, sizeof(struct gl_line_attrib) );
1324 }
1325 if (mask & GL_LIST_BIT) {
1326 MEMCPY( &dst->List, &src->List, sizeof(struct gl_list_attrib) );
1327 }
1328 if (mask & GL_PIXEL_MODE_BIT) {
1329 MEMCPY( &dst->Pixel, &src->Pixel, sizeof(struct gl_pixel_attrib) );
1330 }
1331 if (mask & GL_POINT_BIT) {
1332 MEMCPY( &dst->Point, &src->Point, sizeof(struct gl_point_attrib) );
1333 }
1334 if (mask & GL_POLYGON_BIT) {
1335 MEMCPY( &dst->Polygon, &src->Polygon, sizeof(struct gl_polygon_attrib) );
1336 }
1338 /* Use loop instead of MEMCPY due to problem with Portland Group's
1339 * C compiler. Reported by John Stone.
1340 */
1341 int i;
1342 for (i=0;i<32;i++) {
1343 dst->PolygonStipple[i] = src->PolygonStipple[i];
1344 }
1345 }
1346 if (mask & GL_SCISSOR_BIT) {
1347 MEMCPY( &dst->Scissor, &src->Scissor, sizeof(struct gl_scissor_attrib) );
1348 }
1350 MEMCPY( &dst->Stencil, &src->Stencil, sizeof(struct gl_stencil_attrib) );
1351 }
1352 if (mask & GL_TEXTURE_BIT) {
1353 MEMCPY( &dst->Texture, &src->Texture, sizeof(struct gl_texture_attrib) );
1354 }
1355 if (mask & GL_TRANSFORM_BIT) {
1356 MEMCPY( &dst->Transform, &src->Transform, sizeof(struct gl_transform_attrib) );
1357 }
1358 if (mask & GL_VIEWPORT_BIT) {
1359 MEMCPY( &dst->Viewport, &src->Viewport, sizeof(struct gl_viewport_attrib) );
1360 }
1361}
#define GL_VIEWPORT_BIT
Definition: gl.h:713
#define GL_TEXTURE_BIT
Definition: gl.h:720
#define GL_ACCUM_BUFFER_BIT
Definition: gl.h:711
#define GL_LIST_BIT
Definition: gl.h:719
#define GL_POINT_BIT
Definition: gl.h:703
#define GL_ENABLE_BIT
Definition: gl.h:715
#define GL_POLYGON_BIT
Definition: gl.h:705
#define GL_LINE_BIT
Definition: gl.h:704
#define GL_POLYGON_STIPPLE_BIT
Definition: gl.h:706
#define GL_PIXEL_MODE_BIT
Definition: gl.h:707
#define GL_COLOR_BUFFER_BIT
Definition: gl.h:716
#define GL_SCISSOR_BIT
Definition: gl.h:721
#define GL_STENCIL_BUFFER_BIT
Definition: gl.h:712
#define GL_TRANSFORM_BIT
Definition: gl.h:714
#define GL_FOG_BIT
Definition: gl.h:709
#define GL_HINT_BIT
Definition: gl.h:717
#define GL_CURRENT_BIT
Definition: gl.h:702
#define GL_DEPTH_BUFFER_BIT
Definition: gl.h:710
#define GL_LIGHTING_BIT
Definition: gl.h:708
#define GL_EVAL_BIT
Definition: gl.h:718
GLenum src
Definition: glext.h:6340
GLenum GLint GLuint mask
Definition: glext.h:6028
GLenum GLenum dst
Definition: glext.h:6340
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define MEMCPY(DST, SRC, BYTES)
Definition: macros.h:231

◆ gl_create_context()

GLcontext * gl_create_context ( GLvisual visual,
GLcontext share_list,
void driver_ctx 
)

Definition at line 1093 of file context.c.

1096{
1097 GLcontext *ctx;
1098
1099 /* do some implementation tests */
1100 assert( sizeof(GLbyte) == 1 );
1101 assert( sizeof(GLshort) >= 2 );
1102 assert( sizeof(GLint) >= 4 );
1103 assert( sizeof(GLubyte) == 1 );
1104 assert( sizeof(GLushort) >= 2 );
1105 assert( sizeof(GLuint) >= 4 );
1106
1107 /* misc one-time initializations */
1108 gl_init_math();
1109 gl_init_lists();
1110 gl_init_eval();
1111
1112 ctx = (GLcontext *) calloc( 1, sizeof(GLcontext) );
1113 if (!ctx) {
1114 return NULL;
1115 }
1116
1117 ctx->DriverCtx = driver_ctx;
1118 ctx->Visual = visual;
1119 ctx->Buffer = NULL;
1120
1121 ctx->VB = gl_alloc_vb();
1122 if (!ctx->VB) {
1123 free( ctx );
1124 return NULL;
1125 }
1126
1127 ctx->PB = gl_alloc_pb();
1128 if (!ctx->PB) {
1129 free( ctx->VB );
1130 free( ctx );
1131 return NULL;
1132 }
1133
1134 if (share_list) {
1135 /* share the group of display lists of another context */
1136 ctx->Shared = share_list->Shared;
1137 }
1138 else {
1139 /* allocate new group of display lists */
1140 ctx->Shared = alloc_shared_state();
1141 if (!ctx->Shared) {
1142 free(ctx->VB);
1143 free(ctx->PB);
1144 free(ctx);
1145 return NULL;
1146 }
1147 }
1148 ctx->Shared->RefCount++;
1149
1151
1152 if (visual->DBflag) {
1153 ctx->Color.DrawBuffer = GL_BACK;
1154 ctx->Pixel.ReadBuffer = GL_BACK;
1155 }
1156 else {
1157 ctx->Color.DrawBuffer = GL_FRONT;
1158 ctx->Pixel.ReadBuffer = GL_FRONT;
1159 }
1160
1161#ifdef PROFILE
1162 init_timings( ctx );
1163#endif
1164
1165#ifdef GL_VERSION_1_1
1166 if (!alloc_proxy_textures(ctx)) {
1167 free_shared_state(ctx, ctx->Shared);
1168 free(ctx->VB);
1169 free(ctx->PB);
1170 free(ctx);
1171 return NULL;
1172 }
1173#endif
1174
1176 ctx->API = ctx->Exec; /* GL_EXECUTE is default */
1177
1178 return ctx;
1179}
#define free
Definition: debug_ros.c:5
void gl_init_lists(void)
Definition: dlist.c:573
#define NULL
Definition: types.h:112
static GLboolean alloc_proxy_textures(GLcontext *ctx)
Definition: context.c:1041
static void initialize_context(GLcontext *ctx)
Definition: context.c:565
static struct gl_shared_state * alloc_shared_state(void)
Definition: context.c:443
static void free_shared_state(GLcontext *ctx, struct gl_shared_state *ss)
Definition: context.c:482
void gl_init_eval(void)
Definition: eval.c:89
#define assert(x)
Definition: debug.h:53
unsigned char GLubyte
Definition: gl.h:157
signed char GLbyte
Definition: gl.h:154
short GLshort
Definition: gl.h:155
#define GL_BACK
Definition: gl.h:271
unsigned int GLuint
Definition: gl.h:159
unsigned short GLushort
Definition: gl.h:158
int GLint
Definition: gl.h:156
#define GL_FRONT
Definition: gl.h:270
void gl_init_math(void)
Definition: mmath.c:140
struct pixel_buffer * gl_alloc_pb(void)
Definition: pb.c:109
void gl_init_api_function_pointers(GLcontext *ctx)
Definition: pointers.c:531
#define calloc
Definition: rosglue.h:14
struct gl_shared_state * Shared
Definition: types.h:1265
GLboolean DBflag
Definition: types.h:1138
struct vertex_buffer * gl_alloc_vb(void)
Definition: vb.c:65

Referenced by sw_CreateContext().

◆ gl_create_framebuffer()

GLframebuffer * gl_create_framebuffer ( GLvisual visual)

Definition at line 1230 of file context.c.

1231{
1233
1234 buffer = (GLframebuffer *) calloc( 1, sizeof(GLframebuffer) );
1235 if (!buffer) {
1236 return NULL;
1237 }
1238
1239 buffer->Visual = visual;
1240
1241 return buffer;
1242}
GLuint buffer
Definition: glext.h:5915

Referenced by sw_SetPixelFormat().

◆ gl_create_visual()

GLvisual * gl_create_visual ( GLboolean  rgb_flag,
GLboolean  alpha_flag,
GLboolean  db_flag,
GLint  depth_bits,
GLint  stencil_bits,
GLint  accum_bits,
GLint  index_bits,
GLfloat  red_scale,
GLfloat  green_scale,
GLfloat  blue_scale,
GLfloat  alpha_scale,
GLint  red_bits,
GLint  green_bits,
GLint  blue_bits,
GLint  alpha_bits 
)

Definition at line 936 of file context.c.

951{
952 GLvisual *vis;
953
954 /* Can't do better than 8-bit/channel color at this time */
955 assert( red_scale<=255.0 );
956 assert( green_scale<=255.0 );
957 assert( blue_scale<=255.0 );
958 assert( alpha_scale<=255.0 );
959
960 if (depth_bits > 8*sizeof(GLdepth)) {
961 /* can't meet depth buffer requirements */
962 return NULL;
963 }
964 if (stencil_bits > 8*sizeof(GLstencil)) {
965 /* can't meet stencil buffer requirements */
966 return NULL;
967 }
968 if (accum_bits > 8*sizeof(GLaccum)) {
969 /* can't meet accum buffer requirements */
970 return NULL;
971 }
972
973 vis = (GLvisual *) calloc( 1, sizeof(GLvisual) );
974 if (!vis) {
975 return NULL;
976 }
977
978 vis->RGBAflag = rgb_flag;
979 vis->DBflag = db_flag;
980 vis->RedScale = red_scale;
981 vis->GreenScale = green_scale;
982 vis->BlueScale = blue_scale;
983 vis->AlphaScale = alpha_scale;
984 if (red_scale) {
985 vis->InvRedScale = 1.0F / red_scale;
986 }
987 if (green_scale) {
988 vis->InvGreenScale = 1.0F / green_scale;
989 }
990 if (blue_scale) {
991 vis->InvBlueScale = 1.0F / blue_scale;
992 }
993 if (alpha_scale) {
994 vis->InvAlphaScale = 1.0F / alpha_scale;
995 }
996
997 vis->RedBits = red_bits;
998 vis->GreenBits = green_bits;
999 vis->BlueBits = blue_bits;
1000 vis->AlphaBits = alpha_flag ? 8*sizeof(GLubyte) : alpha_bits;
1001
1002 vis->IndexBits = index_bits;
1003 vis->DepthBits = (depth_bits>0) ? 8*sizeof(GLdepth) : 0;
1004 vis->AccumBits = (accum_bits>0) ? 8*sizeof(GLaccum) : 0;
1005 vis->StencilBits = (stencil_bits>0) ? 8*sizeof(GLstencil) : 0;
1006
1007 if (red_scale==255.0F && green_scale==255.0F
1008 && blue_scale==255.0F && alpha_scale==255.0F) {
1009 vis->EightBitColor = GL_TRUE;
1010 }
1011 else {
1012 vis->EightBitColor = GL_FALSE;
1013 }
1014
1015 /* software alpha buffers */
1016 if (alpha_flag) {
1018 if (db_flag) {
1020 }
1021 }
1022
1023 return vis;
1024}
GLshort GLaccum
Definition: types.h:198
GLubyte GLstencil
Definition: types.h:208
GLint GLdepth
Definition: types.h:218
#define GL_TRUE
Definition: gl.h:174
#define GL_FALSE
Definition: gl.h:173
GLboolean RGBAflag
Definition: types.h:1137
GLint AccumBits
Definition: types.h:1160
GLint GreenBits
Definition: types.h:1154
GLboolean FrontAlphaEnabled
Definition: types.h:1165
GLfloat InvGreenScale
Definition: types.h:1149
GLint BlueBits
Definition: types.h:1155
GLboolean EightBitColor
Definition: types.h:1146
GLfloat AlphaScale
Definition: types.h:1143
GLint RedBits
Definition: types.h:1153
GLfloat BlueScale
Definition: types.h:1142
GLint IndexBits
Definition: types.h:1158
GLint DepthBits
Definition: types.h:1161
GLboolean BackAlphaEnabled
Definition: types.h:1166
GLint StencilBits
Definition: types.h:1162
GLfloat InvBlueScale
Definition: types.h:1150
GLfloat RedScale
Definition: types.h:1140
GLfloat InvRedScale
Definition: types.h:1148
GLfloat GreenScale
Definition: types.h:1141
GLint AlphaBits
Definition: types.h:1156
GLfloat InvAlphaScale
Definition: types.h:1151

Referenced by sw_SetPixelFormat().

◆ gl_destroy_context()

void gl_destroy_context ( GLcontext ctx)

Definition at line 1186 of file context.c.

1187{
1188 if (ctx) {
1189
1190#ifdef PROFILE
1191 if (getenv("MESA_PROFILE")) {
1192 print_timings( ctx );
1193 }
1194#endif
1195
1196 free( ctx->PB );
1197 free( ctx->VB );
1198
1199 ctx->Shared->RefCount--;
1200 assert(ctx->Shared->RefCount>=0);
1201 if (ctx->Shared->RefCount==0) {
1202 /* free shared state */
1203 free_shared_state( ctx, ctx->Shared );
1204 }
1205
1206 /* Free proxy texture objects */
1207 gl_free_texture_object( NULL, ctx->Texture.Proxy1D );
1208 gl_free_texture_object( NULL, ctx->Texture.Proxy2D );
1209
1210 free( (void *) ctx );
1211
1212#ifndef THREADS
1213 if (ctx==CC) {
1214 CC = NULL;
1215 }
1216#endif
1217
1218 }
1219}
GLcontext * CC
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
void gl_free_texture_object(struct gl_shared_state *shared, struct gl_texture_object *t)
Definition: texobj.c:165

Referenced by sw_DeleteContext().

◆ gl_destroy_framebuffer()

void gl_destroy_framebuffer ( GLframebuffer buffer)

Definition at line 1249 of file context.c.

1250{
1251 if (buffer) {
1252 if (buffer->Depth) {
1253 free( buffer->Depth );
1254 }
1255 if (buffer->Accum) {
1256 free( buffer->Accum );
1257 }
1258 if (buffer->Stencil) {
1259 free( buffer->Stencil );
1260 }
1261 if (buffer->FrontAlpha) {
1262 free( buffer->FrontAlpha );
1263 }
1264 if (buffer->BackAlpha) {
1265 free( buffer->BackAlpha );
1266 }
1267 free(buffer);
1268 }
1269}

◆ gl_destroy_visual()

void gl_destroy_visual ( GLvisual vis)

Definition at line 1029 of file context.c.

1030{
1031 free( vis );
1032}

Referenced by sw_SetPixelFormat().

◆ gl_error()

void gl_error ( GLcontext ctx,
GLenum  error,
const char s 
)

Definition at line 1421 of file context.c.

1422{
1424
1425#ifdef DEBUG
1426 debug = GL_TRUE;
1427#else
1428 if (getenv("MESA_DEBUG")) {
1429 debug = GL_TRUE;
1430 }
1431 else {
1432 debug = GL_FALSE;
1433 }
1434#endif
1435
1436 if (debug) {
1437 char errstr[1000];
1438
1439 switch (error) {
1440 case GL_NO_ERROR:
1441 strcpy( errstr, "GL_NO_ERROR" );
1442 break;
1443 case GL_INVALID_VALUE:
1444 strcpy( errstr, "GL_INVALID_VALUE" );
1445 break;
1446 case GL_INVALID_ENUM:
1447 strcpy( errstr, "GL_INVALID_ENUM" );
1448 break;
1450 strcpy( errstr, "GL_INVALID_OPERATION" );
1451 break;
1452 case GL_STACK_OVERFLOW:
1453 strcpy( errstr, "GL_STACK_OVERFLOW" );
1454 break;
1455 case GL_STACK_UNDERFLOW:
1456 strcpy( errstr, "GL_STACK_UNDERFLOW" );
1457 break;
1458 case GL_OUT_OF_MEMORY:
1459 strcpy( errstr, "GL_OUT_OF_MEMORY" );
1460 break;
1461 default:
1462 strcpy( errstr, "unknown" );
1463 break;
1464 }
1465 ERR("Mesa user error: %s in %s\n", wine_dbgstr_a(errstr), wine_dbgstr_a(s));
1466 }
1467
1468 if (ctx->ErrorValue==GL_NO_ERROR) {
1469 ctx->ErrorValue = error;
1470 }
1471
1472 /* Call device driver's error handler, if any. This is used on the Mac. */
1473 if (ctx->Driver.Error) {
1474 (*ctx->Driver.Error)( ctx );
1475 }
1476}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define ERR(fmt,...)
Definition: debug.h:110
#define GL_INVALID_VALUE
Definition: gl.h:695
#define GL_INVALID_OPERATION
Definition: gl.h:696
GLdouble s
Definition: gl.h:2039
#define GL_STACK_OVERFLOW
Definition: gl.h:697
#define GL_NO_ERROR
Definition: gl.h:693
#define GL_OUT_OF_MEMORY
Definition: gl.h:699
unsigned char GLboolean
Definition: gl.h:151
#define GL_INVALID_ENUM
Definition: gl.h:694
#define GL_STACK_UNDERFLOW
Definition: gl.h:698
#define debug(msg)
Definition: key_call.c:71
#define error(str)
Definition: mkdosfs.c:1605
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
Definition: debug.h:187
const char * errstr(int errcode)

Referenced by alloc_instruction(), copy_depth_pixels(), copy_stencil_pixels(), draw_color_pixels(), draw_index_pixels(), draw_stencil_pixels(), drawpixels(), gl_Accum(), gl_alloc_accum_buffer(), gl_alloc_alpha_buffers(), gl_alloc_depth_buffer(), gl_alloc_stencil_buffer(), gl_AlphaFunc(), gl_AreTexturesResident(), gl_Begin(), gl_BindTexture(), gl_Bitmap(), gl_BlendFunc(), gl_Clear(), gl_ClearAccum(), gl_ClearColor(), gl_ClearDepth(), gl_ClearIndex(), gl_ClearStencil(), gl_client_state(), gl_ClipPlane(), gl_ColorMask(), gl_ColorMaterial(), gl_ColorPointer(), gl_ColorTable(), gl_CopyPixels(), gl_CopyTexImage1D(), gl_CopyTexImage2D(), gl_CopyTexSubImage1D(), gl_CopyTexSubImage2D(), gl_CullFace(), gl_DeleteLists(), gl_DeleteTextures(), gl_DepthFunc(), gl_DepthMask(), gl_DepthRange(), gl_DrawArrays(), gl_DrawBuffer(), gl_DrawElements(), gl_DrawPixels(), gl_EdgeFlagPointer(), gl_enable(), gl_End(), gl_EndList(), gl_EvalMesh1(), gl_EvalMesh2(), gl_FeedbackBuffer(), gl_Finish(), gl_Flush(), gl_Fogfv(), gl_free_control_points(), gl_FrontFace(), gl_Frustum(), gl_GenLists(), gl_GenTextures(), gl_GetBooleanv(), gl_GetClipPlane(), gl_GetColorTable(), gl_GetColorTableParameteriv(), gl_GetDoublev(), gl_GetError(), gl_GetFloatv(), gl_GetIntegerv(), gl_GetLightfv(), gl_GetLightiv(), gl_GetMapdv(), gl_GetMapfv(), gl_GetMapiv(), gl_GetMaterialfv(), gl_GetMaterialiv(), gl_GetPixelMapfv(), gl_GetPixelMapuiv(), gl_GetPixelMapusv(), gl_GetPointerv(), gl_GetString(), gl_GetTexEnvfv(), gl_GetTexEnviv(), gl_GetTexGendv(), gl_GetTexGenfv(), gl_GetTexGeniv(), gl_GetTexLevelParameteriv(), gl_GetTexParameterfv(), gl_GetTexParameteriv(), gl_Hint(), gl_IndexMask(), gl_IndexPointer(), gl_InitNames(), gl_InterleavedArrays(), gl_IsEnabled(), gl_IsTexture(), gl_Lightfv(), gl_LightModelfv(), gl_LineStipple(), gl_LineWidth(), gl_ListBase(), gl_LoadIdentity(), gl_LoadMatrixf(), gl_LoadName(), gl_LogicOp(), gl_logicop_ci_pixels(), gl_logicop_ci_span(), gl_Map1f(), gl_Map2f(), gl_MapGrid1f(), gl_MapGrid2f(), gl_Materialfv(), gl_MatrixMode(), gl_MultMatrixf(), gl_NewList(), gl_NormalPointer(), gl_PassThrough(), gl_PixelMapfv(), gl_PixelStorei(), gl_PixelTransferf(), gl_PixelZoom(), gl_PointSize(), gl_PolygonMode(), gl_PolygonOffset(), gl_PolygonStipple(), gl_PopAttrib(), gl_PopClientAttrib(), gl_PopMatrix(), gl_PopName(), gl_PrioritizeTextures(), gl_PushAttrib(), gl_PushClientAttrib(), gl_PushMatrix(), gl_PushName(), gl_ReadBuffer(), gl_ReadPixels(), gl_Rectf(), gl_RenderMode(), gl_save_DrawArrays(), gl_save_DrawElements(), gl_save_NewList(), gl_Scalef(), gl_Scissor(), gl_SelectBuffer(), gl_ShadeModel(), gl_StencilFunc(), gl_StencilMask(), gl_StencilOp(), gl_TexCoordPointer(), gl_TexEnvfv(), gl_TexGenfv(), gl_TexImage1D(), gl_TexImage2D(), gl_TexParameterfv(), gl_TexSubImage1D(), gl_TexSubImage2D(), gl_Translatef(), gl_unpack_pixels(), gl_vertex2f_nop(), gl_vertex3f_nop(), gl_vertex3fv_nop(), gl_vertex4f_nop(), gl_VertexPointer(), gl_Viewport(), read_color_pixels(), read_depth_pixels(), read_index_pixels(), read_stencil_pixels(), texture_1d_error_check(), and texture_2d_error_check().

◆ gl_get_current_context()

GLcontext * gl_get_current_context ( void  )

◆ gl_GetError()

GLenum gl_GetError ( GLcontext ctx)

Definition at line 1481 of file context.c.

1482{
1483 GLenum e;
1484
1485 if (INSIDE_BEGIN_END(ctx)) {
1486 gl_error( ctx, GL_INVALID_OPERATION, "glGetError" );
1487 return GL_INVALID_OPERATION;
1488 }
1489
1490 e = ctx->ErrorValue;
1491 ctx->ErrorValue = GL_NO_ERROR;
1492 return e;
1493}
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
unsigned int GLenum
Definition: gl.h:150
#define e
Definition: ke_i.h:82
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135

Referenced by init_dlist_pointers(), and init_exec_pointers().

◆ gl_make_current()

void gl_make_current ( GLcontext ctx,
GLframebuffer buffer 
)

Definition at line 1276 of file context.c.

1277{
1278 if (ctx && buffer) {
1279 /* TODO: check if ctx and buffer's visual match??? */
1280 ctx->Buffer = buffer; /* Bind the frame buffer to the context */
1281 ctx->NewState = NEW_ALL; /* just to be safe */
1283 }
1284}
void gl_update_state(GLcontext *ctx)
Definition: context.c:1749
#define NEW_ALL
Definition: types.h:1236

Referenced by sw_ReleaseContext(), and sw_SetContext().

◆ gl_problem()

◆ gl_ResizeBuffersMESA()

void gl_ResizeBuffersMESA ( GLcontext ctx)

Definition at line 1497 of file context.c.

1498{
1499 GLint newsize;
1500 GLuint buf_width, buf_height;
1501
1502 ctx->NewState |= NEW_ALL; /* just to be safe */
1503
1504 /* ask device driver for size of output buffer */
1505 (*ctx->Driver.GetBufferSize)( ctx, &buf_width, &buf_height );
1506
1507 /* see if size of device driver's color buffer (window) has changed */
1508 newsize = ctx->Buffer->Width!=buf_width || ctx->Buffer->Height!=buf_height;
1509
1510 /* save buffer size */
1511 ctx->Buffer->Width = buf_width;
1512 ctx->Buffer->Height = buf_height;
1513
1514 /* Reallocate other buffers if needed. */
1515 if (newsize && ctx->Visual->DepthBits>0) {
1516 /* reallocate depth buffer */
1517 (*ctx->Driver.AllocDepthBuffer)( ctx );
1518 /*** if scissoring enabled then clearing can cause a problem ***/
1519 /***(*ctx->Driver.ClearDepthBuffer)( ctx );***/
1520 }
1521 if (newsize && ctx->Visual->StencilBits>0) {
1522 /* reallocate stencil buffer */
1524 }
1525 if (newsize && ctx->Visual->AccumBits>0) {
1526 /* reallocate accum buffer */
1528 }
1529 if (newsize
1530 && (ctx->Visual->FrontAlphaEnabled || ctx->Visual->BackAlphaEnabled)) {
1532 }
1533}
void gl_alloc_accum_buffer(GLcontext *ctx)
Definition: accum.c:59
void gl_alloc_alpha_buffers(GLcontext *ctx)
Definition: alphabuf.c:71
void gl_alloc_stencil_buffer(GLcontext *ctx)
Definition: stencil.c:975

Referenced by gl_Viewport(), sw_call_window_proc(), and sw_SetContext().

◆ gl_set_api_table()

void gl_set_api_table ( GLcontext ctx,
const struct gl_api_table api 
)

Definition at line 1372 of file context.c.

1373{
1374 if (api) {
1375 MEMCPY( &ctx->API, api, sizeof(struct gl_api_table) );
1376 }
1377 else {
1378 MEMCPY( &ctx->API, &ctx->Exec, sizeof(struct gl_api_table) );
1379 }
1380}
api
Definition: notification.c:38

◆ gl_update_state()

void gl_update_state ( GLcontext ctx)

Definition at line 1749 of file context.c.

1750{
1751 if (ctx->NewState & NEW_RASTER_OPS) {
1755 if (ctx->Driver.Dither) {
1756 (*ctx->Driver.Dither)( ctx, ctx->Color.DitherFlag );
1757 }
1758 }
1759
1760 if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING)) {
1762 }
1763
1764 if (ctx->NewState & NEW_LIGHTING) {
1767 }
1768
1769 if (ctx->NewState & NEW_TEXTURING) {
1771 }
1772
1773 if (ctx->NewState & (NEW_LIGHTING | NEW_TEXTURING)) {
1774 /* Check if normal vectors are needed */
1775 GLboolean sphereGen = ctx->Texture.Enabled
1776 && ((ctx->Texture.GenModeS==GL_SPHERE_MAP
1777 && (ctx->Texture.TexGenEnabled & S_BIT))
1778 || (ctx->Texture.GenModeT==GL_SPHERE_MAP
1779 && (ctx->Texture.TexGenEnabled & T_BIT)));
1780 if (ctx->Light.Enabled || sphereGen) {
1781 ctx->NeedNormals = GL_TRUE;
1782 }
1783 else {
1784 ctx->NeedNormals = GL_FALSE;
1785 }
1786 }
1787
1788 if (ctx->NewState & NEW_RASTER_OPS) {
1789 /* Check if incoming colors can be modified during rasterization */
1790 if (ctx->Fog.Enabled ||
1791 ctx->Texture.Enabled ||
1792 ctx->Color.BlendEnabled ||
1793 ctx->Color.SWmasking ||
1794 ctx->Color.SWLogicOpEnabled) {
1795 ctx->MutablePixels = GL_TRUE;
1796 }
1797 else {
1798 ctx->MutablePixels = GL_FALSE;
1799 }
1800 }
1801
1802 if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING)) {
1803 /* Check if all pixels generated are likely to be the same color */
1804 if (ctx->Light.ShadeModel==GL_SMOOTH ||
1805 ctx->Light.Enabled ||
1806 ctx->Fog.Enabled ||
1807 ctx->Texture.Enabled ||
1808 ctx->Color.BlendEnabled ||
1809 ctx->Color.SWmasking ||
1810 ctx->Color.SWLogicOpEnabled) {
1811 ctx->MonoPixels = GL_FALSE; /* pixels probably multicolored */
1812 }
1813 else {
1814 /* pixels will all be same color,
1815 * only glColor() can invalidate this.
1816 */
1817 ctx->MonoPixels = GL_TRUE;
1818 }
1819 }
1820
1821 if (ctx->NewState & NEW_POLYGON) {
1822 /* Setup CullBits bitmask */
1823 ctx->Polygon.CullBits = 0;
1824 if (ctx->Polygon.CullFlag) {
1825 if (ctx->Polygon.CullFaceMode==GL_FRONT ||
1826 ctx->Polygon.CullFaceMode==GL_FRONT_AND_BACK) {
1827 ctx->Polygon.CullBits |= 1;
1828 }
1829 if (ctx->Polygon.CullFaceMode==GL_BACK ||
1830 ctx->Polygon.CullFaceMode==GL_FRONT_AND_BACK) {
1831 ctx->Polygon.CullBits |= 2;
1832 }
1833 }
1834 /* Any Polygon offsets enabled? */
1835 ctx->Polygon.OffsetAny = ctx->Polygon.OffsetPoint ||
1836 ctx->Polygon.OffsetLine ||
1837 ctx->Polygon.OffsetFill;
1838 /* reset Z offsets now */
1839 ctx->PointZoffset = 0.0;
1840 ctx->LineZoffset = 0.0;
1841 ctx->PolygonZoffset = 0.0;
1842 }
1843
1844 if (ctx->NewState & (NEW_POLYGON | NEW_LIGHTING)) {
1845 /* Determine if we can directly call the triangle rasterizer */
1846 if ( ctx->Polygon.Unfilled
1847 || ctx->Polygon.OffsetAny
1848 || ctx->Polygon.CullFlag
1849 || ctx->Light.Model.TwoSide
1850 || ctx->RenderMode!=GL_RENDER) {
1851 ctx->DirectTriangles = GL_FALSE;
1852 }
1853 else {
1854 ctx->DirectTriangles = GL_TRUE;
1855 }
1856 }
1857
1858 /* update scissor region */
1859 ctx->Buffer->Xmin = 0;
1860 ctx->Buffer->Ymin = 0;
1861 ctx->Buffer->Xmax = ctx->Buffer->Width-1;
1862 ctx->Buffer->Ymax = ctx->Buffer->Height-1;
1863 if (ctx->Scissor.Enabled) {
1864 if (ctx->Scissor.X > ctx->Buffer->Xmin) {
1865 ctx->Buffer->Xmin = ctx->Scissor.X;
1866 }
1867 if (ctx->Scissor.Y > ctx->Buffer->Ymin) {
1868 ctx->Buffer->Ymin = ctx->Scissor.Y;
1869 }
1870 if (ctx->Scissor.X + ctx->Scissor.Width - 1 < ctx->Buffer->Xmax) {
1871 ctx->Buffer->Xmax = ctx->Scissor.X + ctx->Scissor.Width - 1;
1872 }
1873 if (ctx->Scissor.Y + ctx->Scissor.Height - 1 < ctx->Buffer->Ymax) {
1874 ctx->Buffer->Ymax = ctx->Scissor.Y + ctx->Scissor.Height - 1;
1875 }
1876 }
1877
1878 /*
1879 * Update Device Driver interface
1880 */
1881 if (ctx->NewState & NEW_RASTER_OPS) {
1882 ctx->Driver.AllocDepthBuffer = gl_alloc_depth_buffer;
1883 ctx->Driver.ClearDepthBuffer = gl_clear_depth_buffer;
1884 if (ctx->Depth.Mask) {
1885 switch (ctx->Depth.Func) {
1886 case GL_LESS:
1887 ctx->Driver.DepthTestSpan = gl_depth_test_span_less;
1888 ctx->Driver.DepthTestPixels = gl_depth_test_pixels_less;
1889 break;
1890 case GL_GREATER:
1891 ctx->Driver.DepthTestSpan = gl_depth_test_span_greater;
1892 ctx->Driver.DepthTestPixels = gl_depth_test_pixels_greater;
1893 break;
1894 default:
1895 ctx->Driver.DepthTestSpan = gl_depth_test_span_generic;
1896 ctx->Driver.DepthTestPixels = gl_depth_test_pixels_generic;
1897 }
1898 }
1899 else {
1900 ctx->Driver.DepthTestSpan = gl_depth_test_span_generic;
1901 ctx->Driver.DepthTestPixels = gl_depth_test_pixels_generic;
1902 }
1903 ctx->Driver.ReadDepthSpanFloat = gl_read_depth_span_float;
1904 ctx->Driver.ReadDepthSpanInt = gl_read_depth_span_int;
1905 }
1906
1907 ctx->Driver.PointsFunc = NULL;
1908 ctx->Driver.LineFunc = NULL;
1909 ctx->Driver.TriangleFunc = NULL;
1910 ctx->Driver.QuadFunc = NULL;
1911 ctx->Driver.RectFunc = NULL;
1912
1913 if (ctx->Driver.UpdateState) {
1914 (*ctx->Driver.UpdateState)(ctx);
1915 }
1916
1921
1923
1924 ctx->NewState = 0;
1925}
void gl_depth_test_pixels_greater(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLdepth z[], GLubyte mask[])
Definition: depth.c:752
GLuint gl_depth_test_span_generic(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], GLubyte mask[])
Definition: depth.c:193
void gl_alloc_depth_buffer(GLcontext *ctx)
Definition: depth.c:848
GLuint gl_depth_test_span_less(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], GLubyte mask[])
Definition: depth.c:419
void gl_depth_test_pixels_generic(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLdepth z[], GLubyte mask[])
Definition: depth.c:489
void gl_read_depth_span_float(GLcontext *ctx, GLuint n, GLint x, GLint y, GLfloat depth[])
Definition: depth.c:789
void gl_depth_test_pixels_less(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLdepth z[], GLubyte mask[])
Definition: depth.c:726
GLuint gl_depth_test_span_greater(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], GLubyte mask[])
Definition: depth.c:447
void gl_read_depth_span_int(GLcontext *ctx, GLuint n, GLint x, GLint y, GLdepth depth[])
Definition: depth.c:820
void gl_clear_depth_buffer(GLcontext *ctx)
Definition: depth.c:875
static void update_clipmask(GLcontext *ctx)
Definition: context.c:1699
static void update_pixel_logic(GLcontext *ctx)
Definition: context.c:1548
static void update_pixel_masking(GLcontext *ctx)
Definition: context.c:1599
static void update_rasterflags(GLcontext *ctx)
Definition: context.c:1655
void gl_set_line_function(GLcontext *ctx)
Definition: lines.c:898
#define S_BIT
Definition: types.h:891
#define NEW_LIGHTING
Definition: types.h:1232
#define NEW_TEXTURING
Definition: types.h:1234
#define NEW_RASTER_OPS
Definition: types.h:1233
#define T_BIT
Definition: types.h:892
#define NEW_POLYGON
Definition: types.h:1235
#define GL_RENDER
Definition: gl.h:388
#define GL_LESS
Definition: gl.h:294
#define GL_FRONT_AND_BACK
Definition: gl.h:336
#define GL_SMOOTH
Definition: gl.h:339
#define GL_GREATER
Definition: gl.h:297
#define GL_SPHERE_MAP
Definition: gl.h:675
void gl_update_lighting(GLcontext *ctx)
Definition: light.c:770
void gl_set_point_function(GLcontext *ctx)
Definition: points.c:541
void gl_set_quad_function(GLcontext *ctx)
Definition: quads.c:82
void gl_update_texture_state(GLcontext *ctx)
Definition: texstate.c:967
void gl_set_triangle_function(GLcontext *ctx)
Definition: triangle.c:708
void gl_set_color_function(GLcontext *ctx)
Definition: vbfill.c:1236
void gl_set_vertex_function(GLcontext *ctx)
Definition: vbfill.c:1154

Referenced by gl_Begin(), gl_Clear(), gl_CopyPixels(), gl_DrawPixels(), gl_make_current(), and gl_render_bitmap().

◆ gl_warning()

void gl_warning ( const GLcontext ctx,
const char s 
)

Definition at line 1406 of file context.c.

1407{
1408 WARN("MESA WARNING: %s\n", wine_dbgstr_a(s));
1409}
#define WARN(fmt,...)
Definition: debug.h:112

Referenced by gl_Accum(), gl_enable(), and gl_RenderMode().

Variable Documentation

◆ CC

GLcontext* CC
extern

Referenced by _mesa_Accum(), _mesa_AlphaFunc(), _mesa_AreTexturesResident(), _mesa_ArrayElement(), _mesa_Begin(), _mesa_BindTexture(), _mesa_Bitmap(), _mesa_BlendFunc(), _mesa_CallList(), _mesa_CallLists(), _mesa_Clear(), _mesa_ClearAccum(), _mesa_ClearColor(), _mesa_ClearDepth(), _mesa_ClearIndex(), _mesa_ClearStencil(), _mesa_ClipPlane(), _mesa_Color3b(), _mesa_Color3bv(), _mesa_Color3d(), _mesa_Color3dv(), _mesa_Color3f(), _mesa_Color3fv(), _mesa_Color3i(), _mesa_Color3iv(), _mesa_Color3s(), _mesa_Color3sv(), _mesa_Color3ub(), _mesa_Color3ubv(), _mesa_Color3ui(), _mesa_Color3uiv(), _mesa_Color3us(), _mesa_Color3usv(), _mesa_Color4b(), _mesa_Color4bv(), _mesa_Color4d(), _mesa_Color4dv(), _mesa_Color4f(), _mesa_Color4fv(), _mesa_Color4i(), _mesa_Color4iv(), _mesa_Color4s(), _mesa_Color4sv(), _mesa_Color4ub(), _mesa_Color4ubv(), _mesa_Color4ui(), _mesa_Color4uiv(), _mesa_Color4us(), _mesa_Color4usv(), _mesa_ColorMask(), _mesa_ColorMaterial(), _mesa_ColorPointer(), _mesa_ColorSubTableEXT(), _mesa_ColorTableEXT(), _mesa_CopyPixels(), _mesa_CopyTexImage1D(), _mesa_CopyTexImage2D(), _mesa_CopyTexSubImage1D(), _mesa_CopyTexSubImage2D(), _mesa_CullFace(), _mesa_DeleteLists(), _mesa_DeleteTextures(), _mesa_DepthFunc(), _mesa_DepthMask(), _mesa_DepthRange(), _mesa_Disable(), _mesa_DisableClientState(), _mesa_DrawArrays(), _mesa_DrawBuffer(), _mesa_DrawElements(), _mesa_DrawPixels(), _mesa_EdgeFlag(), _mesa_EdgeFlagPointer(), _mesa_EdgeFlagv(), _mesa_Enable(), _mesa_EnableClientState(), _mesa_End(), _mesa_EndList(), _mesa_EvalCoord1d(), _mesa_EvalCoord1dv(), _mesa_EvalCoord1f(), _mesa_EvalCoord1fv(), _mesa_EvalCoord2d(), _mesa_EvalCoord2dv(), _mesa_EvalCoord2f(), _mesa_EvalCoord2fv(), _mesa_EvalMesh1(), _mesa_EvalMesh2(), _mesa_EvalPoint1(), _mesa_EvalPoint2(), _mesa_FeedbackBuffer(), _mesa_Finish(), _mesa_Flush(), _mesa_Fogf(), _mesa_Fogfv(), _mesa_Fogi(), _mesa_Fogiv(), _mesa_FrontFace(), _mesa_Frustum(), _mesa_GenLists(), _mesa_GenTextures(), _mesa_GetBooleanv(), _mesa_GetClipPlane(), _mesa_GetColorTableEXT(), _mesa_GetColorTableParameterivEXT(), _mesa_GetDoublev(), _mesa_GetError(), _mesa_GetFloatv(), _mesa_GetIntegerv(), _mesa_GetLightfv(), _mesa_GetLightiv(), _mesa_GetMapdv(), _mesa_GetMapfv(), _mesa_GetMapiv(), _mesa_GetMaterialfv(), _mesa_GetMaterialiv(), _mesa_GetPixelMapfv(), _mesa_GetPixelMapuiv(), _mesa_GetPixelMapusv(), _mesa_GetPointerv(), _mesa_GetPolygonStipple(), _mesa_GetString(), _mesa_GetTexEnvfv(), _mesa_GetTexEnviv(), _mesa_GetTexGendv(), _mesa_GetTexGenfv(), _mesa_GetTexGeniv(), _mesa_GetTexImage(), _mesa_GetTexLevelParameterfv(), _mesa_GetTexLevelParameteriv(), _mesa_GetTexParameterfv(), _mesa_GetTexParameteriv(), _mesa_Hint(), _mesa_Indexd(), _mesa_Indexdv(), _mesa_Indexf(), _mesa_Indexfv(), _mesa_Indexi(), _mesa_Indexiv(), _mesa_IndexMask(), _mesa_IndexPointer(), _mesa_Indexs(), _mesa_Indexsv(), _mesa_InitNames(), _mesa_InterleavedArrays(), _mesa_IsEnabled(), _mesa_IsList(), _mesa_IsTexture(), _mesa_Lightf(), _mesa_Lightfv(), _mesa_Lighti(), _mesa_Lightiv(), _mesa_LightModelf(), _mesa_LightModelfv(), _mesa_LightModeli(), _mesa_LightModeliv(), _mesa_LineStipple(), _mesa_LineWidth(), _mesa_ListBase(), _mesa_LoadIdentity(), _mesa_LoadMatrixd(), _mesa_LoadMatrixf(), _mesa_LoadName(), _mesa_LogicOp(), _mesa_Map1d(), _mesa_Map1f(), _mesa_Map2d(), _mesa_Map2f(), _mesa_MapGrid1d(), _mesa_MapGrid1f(), _mesa_MapGrid2d(), _mesa_MapGrid2f(), _mesa_Materialf(), _mesa_Materialfv(), _mesa_Materiali(), _mesa_Materialiv(), _mesa_MatrixMode(), _mesa_MultMatrixd(), _mesa_MultMatrixf(), _mesa_NewList(), _mesa_Normal3b(), _mesa_Normal3bv(), _mesa_Normal3d(), _mesa_Normal3dv(), _mesa_Normal3f(), _mesa_Normal3fv(), _mesa_Normal3i(), _mesa_Normal3iv(), _mesa_Normal3s(), _mesa_Normal3sv(), _mesa_NormalPointer(), _mesa_Ortho(), _mesa_PassThrough(), _mesa_PixelMapfv(), _mesa_PixelMapuiv(), _mesa_PixelMapusv(), _mesa_PixelStoref(), _mesa_PixelStorei(), _mesa_PixelTransferf(), _mesa_PixelTransferi(), _mesa_PixelZoom(), _mesa_PointSize(), _mesa_PolygonMode(), _mesa_PolygonOffset(), _mesa_PolygonStipple(), _mesa_PopAttrib(), _mesa_PopClientAttrib(), _mesa_PopMatrix(), _mesa_PopName(), _mesa_PrioritizeTextures(), _mesa_PushAttrib(), _mesa_PushClientAttrib(), _mesa_PushMatrix(), _mesa_PushName(), _mesa_RasterPos2d(), _mesa_RasterPos2dv(), _mesa_RasterPos2f(), _mesa_RasterPos2fv(), _mesa_RasterPos2i(), _mesa_RasterPos2iv(), _mesa_RasterPos2s(), _mesa_RasterPos2sv(), _mesa_RasterPos3d(), _mesa_RasterPos3dv(), _mesa_RasterPos3f(), _mesa_RasterPos3fv(), _mesa_RasterPos3i(), _mesa_RasterPos3iv(), _mesa_RasterPos3s(), _mesa_RasterPos3sv(), _mesa_RasterPos4d(), _mesa_RasterPos4dv(), _mesa_RasterPos4f(), _mesa_RasterPos4fv(), _mesa_RasterPos4i(), _mesa_RasterPos4iv(), _mesa_RasterPos4s(), _mesa_RasterPos4sv(), _mesa_ReadBuffer(), _mesa_ReadPixels(), _mesa_Rectd(), _mesa_Rectdv(), _mesa_Rectf(), _mesa_Rectfv(), _mesa_Recti(), _mesa_Rectiv(), _mesa_Rects(), _mesa_Rectsv(), _mesa_RenderMode(), _mesa_Rotated(), _mesa_Rotatef(), _mesa_Scaled(), _mesa_Scalef(), _mesa_Scissor(), _mesa_SelectBuffer(), _mesa_ShadeModel(), _mesa_StencilFunc(), _mesa_StencilMask(), _mesa_StencilOp(), _mesa_TexCoord1d(), _mesa_TexCoord1dv(), _mesa_TexCoord1f(), _mesa_TexCoord1fv(), _mesa_TexCoord1i(), _mesa_TexCoord1iv(), _mesa_TexCoord1s(), _mesa_TexCoord1sv(), _mesa_TexCoord2d(), _mesa_TexCoord2dv(), _mesa_TexCoord2f(), _mesa_TexCoord2fv(), _mesa_TexCoord2i(), _mesa_TexCoord2iv(), _mesa_TexCoord2s(), _mesa_TexCoord2sv(), _mesa_TexCoord3d(), _mesa_TexCoord3dv(), _mesa_TexCoord3f(), _mesa_TexCoord3fv(), _mesa_TexCoord3i(), _mesa_TexCoord3iv(), _mesa_TexCoord3s(), _mesa_TexCoord3sv(), _mesa_TexCoord4d(), _mesa_TexCoord4dv(), _mesa_TexCoord4f(), _mesa_TexCoord4fv(), _mesa_TexCoord4i(), _mesa_TexCoord4iv(), _mesa_TexCoord4s(), _mesa_TexCoord4sv(), _mesa_TexCoordPointer(), _mesa_TexEnvf(), _mesa_TexEnvfv(), _mesa_TexEnvi(), _mesa_TexEnviv(), _mesa_TexGend(), _mesa_TexGendv(), _mesa_TexGenf(), _mesa_TexGenfv(), _mesa_TexGeni(), _mesa_TexGeniv(), _mesa_TexImage1D(), _mesa_TexImage2D(), _mesa_TexParameterf(), _mesa_TexParameterfv(), _mesa_TexParameteri(), _mesa_TexParameteriv(), _mesa_TexSubImage1D(), _mesa_TexSubImage2D(), _mesa_Translated(), _mesa_Translatef(), _mesa_Vertex2d(), _mesa_Vertex2dv(), _mesa_Vertex2f(), _mesa_Vertex2fv(), _mesa_Vertex2i(), _mesa_Vertex2iv(), _mesa_Vertex2s(), _mesa_Vertex2sv(), _mesa_Vertex3d(), _mesa_Vertex3dv(), _mesa_Vertex3f(), _mesa_Vertex3fv(), _mesa_Vertex3i(), _mesa_Vertex3iv(), _mesa_Vertex3s(), _mesa_Vertex3sv(), _mesa_Vertex4d(), _mesa_Vertex4dv(), _mesa_Vertex4f(), _mesa_Vertex4fv(), _mesa_Vertex4i(), _mesa_Vertex4iv(), _mesa_Vertex4s(), _mesa_Vertex4sv(), _mesa_VertexPointer(), _mesa_Viewport(), and gl_destroy_context().