1 /* $Id: pointers.c,v 1.20 1997/10/29 01:29:09 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 2.5
6 * Copyright (C) 1995-1997 Brian Paul
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23
24 /*
25 * $Log: pointers.c,v $
26 * Revision 1.20 1997/10/29 01:29:09 brianp
27 * added GL_EXT_point_parameters extension from Daniel Barrero
28 *
29 * Revision 1.19 1997/09/27 00:16:30 brianp
30 * added GL_EXT_paletted_texture extension
31 *
32 * Revision 1.18 1997/07/24 01:23:44 brianp
33 * changed precompiled header symbol from PCH to PC_HEADER
34 *
35 * Revision 1.17 1997/06/20 02:50:55 brianp
36 * added Color4ubv API pointer
37 *
38 * Revision 1.16 1997/05/28 03:26:02 brianp
39 * added precompiled header (PCH) support
40 *
41 * Revision 1.15 1997/05/24 12:08:25 brianp
42 * broke gl_init_api_function_pointers() into sub-functions
43 *
44 * Revision 1.14 1997/04/24 01:50:53 brianp
45 * optimized glColor3f, glColor3fv, glColor4fv
46 *
47 * Revision 1.13 1997/04/21 01:22:27 brianp
48 * added gl_save_Rectf()
49 *
50 * Revision 1.12 1997/04/20 20:28:49 brianp
51 * replaced abort() with gl_problem()
52 *
53 * Revision 1.11 1997/04/20 16:18:15 brianp
54 * added glOrtho and glFrustum API pointers
55 *
56 * Revision 1.10 1997/04/16 23:55:33 brianp
57 * added optimized glTexCoord2f code
58 *
59 * Revision 1.9 1997/04/14 22:18:23 brianp
60 * added optimized glVertex3fv code
61 *
62 * Revision 1.8 1997/04/14 02:00:39 brianp
63 * #include "texstate.h" instead of "texture.h"
64 *
65 * Revision 1.7 1997/04/12 12:33:12 brianp
66 * added #include "rect.h"
67 *
68 * Revision 1.6 1997/04/07 02:57:13 brianp
69 * added API.Vertex[23] functions
70 *
71 * Revision 1.5 1997/04/01 04:25:18 brianp
72 * added pointer for LoadIdentity, changed #include's
73 *
74 * Revision 1.4 1997/02/10 19:49:29 brianp
75 * added glResizeBuffersMESA() code
76 *
77 * Revision 1.3 1997/02/09 18:50:42 brianp
78 * added GL_EXT_texture3D support
79 *
80 * Revision 1.2 1996/10/16 00:52:22 brianp
81 * gl_initialize_api_function_pointers() now gl_init_api_function_pointers()
82 *
83 * Revision 1.1 1996/09/13 01:38:16 brianp
84 * Initial revision
85 *
86 */
87
88
89 #ifdef PC_HEADER
90 #include "all.h"
91 #else
92 #include <stdio.h>
93 #include <stdlib.h>
94 #include <string.h>
95 #include "accum.h"
96 #include "alpha.h"
97 #include "attrib.h"
98 #include "bitmap.h"
99 #include "blend.h"
100 #include "clip.h"
101 #include "context.h"
102 #include "colortab.h"
103 #include "copypix.h"
104 #include "depth.h"
105 #include "drawpix.h"
106 #include "enable.h"
107 #include "eval.h"
108 #include "feedback.h"
109 #include "fog.h"
110 #include "get.h"
111 #include "light.h"
112 #include "lines.h"
113 #include "dlist.h"
114 #include "logic.h"
115 #include "macros.h"
116 #include "masking.h"
117 #include "matrix.h"
118 #include "misc.h"
119 #include "pixel.h"
120 #include "points.h"
121 #include "polygon.h"
122 #include "rastpos.h"
123 #include "readpix.h"
124 #include "rect.h"
125 #include "scissor.h"
126 #include "stencil.h"
127 #include "teximage.h"
128 #include "texobj.h"
129 #include "texstate.h"
130 #include "types.h"
131 #include "varray.h"
132 #include "vbfill.h"
133 #endif
134
135
136
137 /*
138 * For debugging
139 */
check_pointers(struct gl_api_table * table)140 static void check_pointers( struct gl_api_table *table )
141 {
142 void **entry;
143 int numentries = sizeof( struct gl_api_table ) / sizeof(void*);
144 int i;
145
146 entry = (void **) table;
147
148 for (i=0;i<numentries;i++) {
149 if (!entry[i]) {
150 printf("found uninitialized function pointer at %d\n", i );
151 gl_problem(NULL, "Missing pointer in pointers.c");
152 /*abort()*/
153 }
154 }
155 }
156
157
158 /*
159 * Assign all the pointers in 'table' to point to Mesa's immediate-mode
160 * execution functions.
161 */
init_exec_pointers(struct gl_api_table * table)162 static void init_exec_pointers( struct gl_api_table *table )
163 {
164 table->Accum = gl_Accum;
165 table->AlphaFunc = gl_AlphaFunc;
166 table->AreTexturesResident = gl_AreTexturesResident;
167 table->ArrayElement = gl_ArrayElement;
168 table->Begin = gl_Begin;
169 table->BindTexture = gl_BindTexture;
170 table->Bitmap = gl_Bitmap;
171 table->BlendFunc = gl_BlendFunc;
172 table->CallList = gl_CallList;
173 table->CallLists = gl_CallLists;
174 table->Clear = gl_Clear;
175 table->ClearAccum = gl_ClearAccum;
176 table->ClearColor = gl_ClearColor;
177 table->ClearDepth = gl_ClearDepth;
178 table->ClearIndex = gl_ClearIndex;
179 table->ClearStencil = gl_ClearStencil;
180 table->ClipPlane = gl_ClipPlane;
181 table->Color3f = gl_Color3f;
182 table->Color3fv = gl_Color3fv;
183 table->Color4f = gl_Color4f;
184 table->Color4fv = gl_Color4fv;
185 table->Color4ub = gl_Color4ub;
186 table->Color4ubv = gl_Color4ubv;
187 table->ColorMask = gl_ColorMask;
188 table->ColorMaterial = gl_ColorMaterial;
189 table->ColorPointer = gl_ColorPointer;
190 table->ColorTable = gl_ColorTable;
191 table->ColorSubTable = gl_ColorSubTable;
192 table->CopyPixels = gl_CopyPixels;
193 table->CopyTexImage1D = gl_CopyTexImage1D;
194 table->CopyTexImage2D = gl_CopyTexImage2D;
195 table->CopyTexSubImage1D = gl_CopyTexSubImage1D;
196 table->CopyTexSubImage2D = gl_CopyTexSubImage2D;
197 table->CullFace = gl_CullFace;
198 table->DeleteLists = gl_DeleteLists;
199 table->DeleteTextures = gl_DeleteTextures;
200 table->DepthFunc = gl_DepthFunc;
201 table->DepthMask = gl_DepthMask;
202 table->DepthRange = gl_DepthRange;
203 table->Disable = gl_Disable;
204 table->DisableClientState = gl_DisableClientState;
205 table->DrawArrays = gl_DrawArrays;
206 table->DrawBuffer = gl_DrawBuffer;
207 table->DrawElements = gl_DrawElements;
208 table->DrawPixels = gl_DrawPixels;
209 table->EdgeFlag = gl_EdgeFlag;
210 table->EdgeFlagPointer = gl_EdgeFlagPointer;
211 table->Enable = gl_Enable;
212 table->EnableClientState = gl_EnableClientState;
213 table->End = gl_End;
214 table->EndList = gl_EndList;
215 table->EvalCoord1f = gl_EvalCoord1f;
216 table->EvalCoord2f = gl_EvalCoord2f;
217 table->EvalMesh1 = gl_EvalMesh1;
218 table->EvalMesh2 = gl_EvalMesh2;
219 table->EvalPoint1 = gl_EvalPoint1;
220 table->EvalPoint2 = gl_EvalPoint2;
221 table->FeedbackBuffer = gl_FeedbackBuffer;
222 table->Finish = gl_Finish;
223 table->Flush = gl_Flush;
224 table->Fogfv = gl_Fogfv;
225 table->FrontFace = gl_FrontFace;
226 table->Frustum = gl_Frustum;
227 table->GenLists = gl_GenLists;
228 table->GenTextures = gl_GenTextures;
229 table->GetBooleanv = gl_GetBooleanv;
230 table->GetClipPlane = gl_GetClipPlane;
231 table->GetColorTable = gl_GetColorTable;
232 table->GetColorTableParameteriv = gl_GetColorTableParameteriv;
233 table->GetDoublev = gl_GetDoublev;
234 table->GetError = gl_GetError;
235 table->GetFloatv = gl_GetFloatv;
236 table->GetIntegerv = gl_GetIntegerv;
237 table->GetPointerv = gl_GetPointerv;
238 table->GetLightfv = gl_GetLightfv;
239 table->GetLightiv = gl_GetLightiv;
240 table->GetMapdv = gl_GetMapdv;
241 table->GetMapfv = gl_GetMapfv;
242 table->GetMapiv = gl_GetMapiv;
243 table->GetMaterialfv = gl_GetMaterialfv;
244 table->GetMaterialiv = gl_GetMaterialiv;
245 table->GetPixelMapfv = gl_GetPixelMapfv;
246 table->GetPixelMapuiv = gl_GetPixelMapuiv;
247 table->GetPixelMapusv = gl_GetPixelMapusv;
248 table->GetPolygonStipple = gl_GetPolygonStipple;
249 table->GetString = gl_GetString;
250 table->GetTexEnvfv = gl_GetTexEnvfv;
251 table->GetTexEnviv = gl_GetTexEnviv;
252 table->GetTexGendv = gl_GetTexGendv;
253 table->GetTexGenfv = gl_GetTexGenfv;
254 table->GetTexGeniv = gl_GetTexGeniv;
255 table->GetTexImage = gl_GetTexImage;
256 table->GetTexLevelParameterfv = gl_GetTexLevelParameterfv;
257 table->GetTexLevelParameteriv = gl_GetTexLevelParameteriv;
258 table->GetTexParameterfv = gl_GetTexParameterfv;
259 table->GetTexParameteriv = gl_GetTexParameteriv;
260 table->Hint = gl_Hint;
261 table->Indexf = gl_Indexf;
262 table->Indexi = gl_Indexi;
263 table->IndexMask = gl_IndexMask;
264 table->IndexPointer = gl_IndexPointer;
265 table->InitNames = gl_InitNames;
266 table->InterleavedArrays = gl_InterleavedArrays;
267 table->IsEnabled = gl_IsEnabled;
268 table->IsList = gl_IsList;
269 table->IsTexture = gl_IsTexture;
270 table->LightModelfv = gl_LightModelfv;
271 table->Lightfv = gl_Lightfv;
272 table->LineStipple = gl_LineStipple;
273 table->LineWidth = gl_LineWidth;
274 table->ListBase = gl_ListBase;
275 table->LoadIdentity = gl_LoadIdentity;
276 table->LoadMatrixf = gl_LoadMatrixf;
277 table->LoadName = gl_LoadName;
278 table->LogicOp = gl_LogicOp;
279 table->Map1f = gl_Map1f;
280 table->Map2f = gl_Map2f;
281 table->MapGrid1f = gl_MapGrid1f;
282 table->MapGrid2f = gl_MapGrid2f;
283 table->Materialfv = gl_Materialfv;
284 table->MatrixMode = gl_MatrixMode;
285 table->MultMatrixf = gl_MultMatrixf;
286 table->NewList = gl_NewList;
287 table->Normal3f = gl_Normal3f;
288 table->NormalPointer = gl_NormalPointer;
289 table->Normal3fv = gl_Normal3fv;
290 table->Ortho = gl_Ortho;
291 table->PassThrough = gl_PassThrough;
292 table->PixelMapfv = gl_PixelMapfv;
293 table->PixelStorei = gl_PixelStorei;
294 table->PixelTransferf = gl_PixelTransferf;
295 table->PixelZoom = gl_PixelZoom;
296 table->PointSize = gl_PointSize;
297 table->PolygonMode = gl_PolygonMode;
298 table->PolygonOffset = gl_PolygonOffset;
299 table->PolygonStipple = gl_PolygonStipple;
300 table->PopAttrib = gl_PopAttrib;
301 table->PopClientAttrib = gl_PopClientAttrib;
302 table->PopMatrix = gl_PopMatrix;
303 table->PopName = gl_PopName;
304 table->PrioritizeTextures = gl_PrioritizeTextures;
305 table->PushAttrib = gl_PushAttrib;
306 table->PushClientAttrib = gl_PushClientAttrib;
307 table->PushMatrix = gl_PushMatrix;
308 table->PushName = gl_PushName;
309 table->RasterPos4f = gl_RasterPos4f;
310 table->ReadBuffer = gl_ReadBuffer;
311 table->ReadPixels = gl_ReadPixels;
312 table->Rectf = gl_Rectf;
313 table->RenderMode = gl_RenderMode;
314 table->Rotatef = gl_Rotatef;
315 table->Scalef = gl_Scalef;
316 table->Scissor = gl_Scissor;
317 table->SelectBuffer = gl_SelectBuffer;
318 table->ShadeModel = gl_ShadeModel;
319 table->StencilFunc = gl_StencilFunc;
320 table->StencilMask = gl_StencilMask;
321 table->StencilOp = gl_StencilOp;
322 table->TexCoord2f = gl_TexCoord2f;
323 table->TexCoord4f = gl_TexCoord4f;
324 table->TexCoordPointer = gl_TexCoordPointer;
325 table->TexEnvfv = gl_TexEnvfv;
326 table->TexGenfv = gl_TexGenfv;
327 table->TexImage1D = gl_TexImage1D;
328 table->TexImage2D = gl_TexImage2D;
329 table->TexSubImage1D = gl_TexSubImage1D;
330 table->TexSubImage2D = gl_TexSubImage2D;
331 table->TexParameterfv = gl_TexParameterfv;
332 table->Translatef = gl_Translatef;
333 table->Vertex2f = gl_vertex2f_nop;
334 table->Vertex3f = gl_vertex3f_nop;
335 table->Vertex4f = gl_vertex4f_nop;
336 table->Vertex3fv = gl_vertex3fv_nop;
337 table->VertexPointer = gl_VertexPointer;
338 table->Viewport = gl_Viewport;
339 }
340
341
342
343 /*
344 * Assign all the pointers in 'table' to point to Mesa's display list
345 * building functions.
346 */
init_dlist_pointers(struct gl_api_table * table)347 static void init_dlist_pointers( struct gl_api_table *table )
348 {
349 table->Accum = gl_save_Accum;
350 table->AlphaFunc = gl_save_AlphaFunc;
351 table->AreTexturesResident = gl_AreTexturesResident;
352 table->ArrayElement = gl_save_ArrayElement;
353 table->Begin = gl_save_Begin;
354 table->BindTexture = gl_save_BindTexture;
355 table->Bitmap = gl_save_Bitmap;
356 table->BlendFunc = gl_save_BlendFunc;
357 table->CallList = gl_save_CallList;
358 table->CallLists = gl_save_CallLists;
359 table->Clear = gl_save_Clear;
360 table->ClearAccum = gl_save_ClearAccum;
361 table->ClearColor = gl_save_ClearColor;
362 table->ClearDepth = gl_save_ClearDepth;
363 table->ClearIndex = gl_save_ClearIndex;
364 table->ClearStencil = gl_save_ClearStencil;
365 table->ClipPlane = gl_save_ClipPlane;
366 table->Color3f = gl_save_Color3f;
367 table->Color3fv = gl_save_Color3fv;
368 table->Color4f = gl_save_Color4f;
369 table->Color4fv = gl_save_Color4fv;
370 table->Color4ub = gl_save_Color4ub;
371 table->Color4ubv = gl_save_Color4ubv;
372 table->ColorMask = gl_save_ColorMask;
373 table->ColorMaterial = gl_save_ColorMaterial;
374 table->ColorPointer = gl_ColorPointer;
375 table->ColorTable = gl_save_ColorTable;
376 table->ColorSubTable = gl_save_ColorSubTable;
377 table->CopyPixels = gl_save_CopyPixels;
378 table->CopyTexImage1D = gl_save_CopyTexImage1D;
379 table->CopyTexImage2D = gl_save_CopyTexImage2D;
380 table->CopyTexSubImage1D = gl_save_CopyTexSubImage1D;
381 table->CopyTexSubImage2D = gl_save_CopyTexSubImage2D;
382 table->CullFace = gl_save_CullFace;
383 table->DeleteLists = gl_DeleteLists; /* NOT SAVED */
384 table->DeleteTextures = gl_DeleteTextures; /* NOT SAVED */
385 table->DepthFunc = gl_save_DepthFunc;
386 table->DepthMask = gl_save_DepthMask;
387 table->DepthRange = gl_save_DepthRange;
388 table->Disable = gl_save_Disable;
389 table->DisableClientState = gl_DisableClientState; /* NOT SAVED */
390 table->DrawArrays = gl_save_DrawArrays;
391 table->DrawBuffer = gl_save_DrawBuffer;
392 table->DrawElements = gl_save_DrawElements;
393 table->DrawPixels = gl_DrawPixels; /* SPECIAL CASE */
394 table->EdgeFlag = gl_save_EdgeFlag;
395 table->EdgeFlagPointer = gl_EdgeFlagPointer;
396 table->Enable = gl_save_Enable;
397 table->EnableClientState = gl_EnableClientState; /* NOT SAVED */
398 table->End = gl_save_End;
399 table->EndList = gl_EndList; /* NOT SAVED */
400 table->EvalCoord1f = gl_save_EvalCoord1f;
401 table->EvalCoord2f = gl_save_EvalCoord2f;
402 table->EvalMesh1 = gl_save_EvalMesh1;
403 table->EvalMesh2 = gl_save_EvalMesh2;
404 table->EvalPoint1 = gl_save_EvalPoint1;
405 table->EvalPoint2 = gl_save_EvalPoint2;
406 table->FeedbackBuffer = gl_FeedbackBuffer; /* NOT SAVED */
407 table->Finish = gl_Finish; /* NOT SAVED */
408 table->Flush = gl_Flush; /* NOT SAVED */
409 table->Fogfv = gl_save_Fogfv;
410 table->FrontFace = gl_save_FrontFace;
411 table->Frustum = gl_save_Frustum;
412 table->GenLists = gl_GenLists; /* NOT SAVED */
413 table->GenTextures = gl_GenTextures; /* NOT SAVED */
414
415 /* NONE OF THESE COMMANDS ARE COMPILED INTO DISPLAY LISTS */
416 table->GetBooleanv = gl_GetBooleanv;
417 table->GetClipPlane = gl_GetClipPlane;
418 table->GetColorTable = gl_GetColorTable;
419 table->GetColorTableParameteriv = gl_GetColorTableParameteriv;
420 table->GetDoublev = gl_GetDoublev;
421 table->GetError = gl_GetError;
422 table->GetFloatv = gl_GetFloatv;
423 table->GetIntegerv = gl_GetIntegerv;
424 table->GetString = gl_GetString;
425 table->GetLightfv = gl_GetLightfv;
426 table->GetLightiv = gl_GetLightiv;
427 table->GetMapdv = gl_GetMapdv;
428 table->GetMapfv = gl_GetMapfv;
429 table->GetMapiv = gl_GetMapiv;
430 table->GetMaterialfv = gl_GetMaterialfv;
431 table->GetMaterialiv = gl_GetMaterialiv;
432 table->GetPixelMapfv = gl_GetPixelMapfv;
433 table->GetPixelMapuiv = gl_GetPixelMapuiv;
434 table->GetPixelMapusv = gl_GetPixelMapusv;
435 table->GetPointerv = gl_GetPointerv;
436 table->GetPolygonStipple = gl_GetPolygonStipple;
437 table->GetTexEnvfv = gl_GetTexEnvfv;
438 table->GetTexEnviv = gl_GetTexEnviv;
439 table->GetTexGendv = gl_GetTexGendv;
440 table->GetTexGenfv = gl_GetTexGenfv;
441 table->GetTexGeniv = gl_GetTexGeniv;
442 table->GetTexImage = gl_GetTexImage;
443 table->GetTexLevelParameterfv = gl_GetTexLevelParameterfv;
444 table->GetTexLevelParameteriv = gl_GetTexLevelParameteriv;
445 table->GetTexParameterfv = gl_GetTexParameterfv;
446 table->GetTexParameteriv = gl_GetTexParameteriv;
447
448 table->Hint = gl_save_Hint;
449 table->IndexMask = gl_save_IndexMask;
450 table->Indexf = gl_save_Indexf;
451 table->Indexi = gl_save_Indexi;
452 table->IndexPointer = gl_IndexPointer;
453 table->InitNames = gl_save_InitNames;
454 table->InterleavedArrays = gl_save_InterleavedArrays;
455 table->IsEnabled = gl_IsEnabled; /* NOT SAVED */
456 table->IsTexture = gl_IsTexture; /* NOT SAVED */
457 table->IsList = gl_IsList; /* NOT SAVED */
458 table->LightModelfv = gl_save_LightModelfv;
459 table->Lightfv = gl_save_Lightfv;
460 table->LineStipple = gl_save_LineStipple;
461 table->LineWidth = gl_save_LineWidth;
462 table->ListBase = gl_save_ListBase;
463 table->LoadIdentity = gl_save_LoadIdentity;
464 table->LoadMatrixf = gl_save_LoadMatrixf;
465 table->LoadName = gl_save_LoadName;
466 table->LogicOp = gl_save_LogicOp;
467 table->Map1f = gl_save_Map1f;
468 table->Map2f = gl_save_Map2f;
469 table->MapGrid1f = gl_save_MapGrid1f;
470 table->MapGrid2f = gl_save_MapGrid2f;
471 table->Materialfv = gl_save_Materialfv;
472 table->MatrixMode = gl_save_MatrixMode;
473 table->MultMatrixf = gl_save_MultMatrixf;
474 table->NewList = gl_save_NewList;
475 table->Normal3f = gl_save_Normal3f;
476 table->Normal3fv = gl_save_Normal3fv;
477 table->NormalPointer = gl_NormalPointer; /* NOT SAVED */
478 table->Ortho = gl_save_Ortho;
479 table->PassThrough = gl_save_PassThrough;
480 table->PixelMapfv = gl_save_PixelMapfv;
481 table->PixelStorei = gl_PixelStorei; /* NOT SAVED */
482 table->PixelTransferf = gl_save_PixelTransferf;
483 table->PixelZoom = gl_save_PixelZoom;
484 table->PointSize = gl_save_PointSize;
485 table->PolygonMode = gl_save_PolygonMode;
486 table->PolygonOffset = gl_save_PolygonOffset;
487 table->PolygonStipple = gl_save_PolygonStipple;
488 table->PopAttrib = gl_save_PopAttrib;
489 table->PopClientAttrib = gl_PopClientAttrib; /* NOT SAVED */
490 table->PopMatrix = gl_save_PopMatrix;
491 table->PopName = gl_save_PopName;
492 table->PrioritizeTextures = gl_save_PrioritizeTextures;
493 table->PushAttrib = gl_save_PushAttrib;
494 table->PushClientAttrib = gl_PushClientAttrib; /* NOT SAVED */
495 table->PushMatrix = gl_save_PushMatrix;
496 table->PushName = gl_save_PushName;
497 table->RasterPos4f = gl_save_RasterPos4f;
498 table->ReadBuffer = gl_save_ReadBuffer;
499 table->ReadPixels = gl_ReadPixels; /* NOT SAVED */
500 table->Rectf = gl_save_Rectf;
501 table->RenderMode = gl_RenderMode; /* NOT SAVED */
502 table->Rotatef = gl_save_Rotatef;
503 table->Scalef = gl_save_Scalef;
504 table->Scissor = gl_save_Scissor;
505 table->SelectBuffer = gl_SelectBuffer; /* NOT SAVED */
506 table->ShadeModel = gl_save_ShadeModel;
507 table->StencilFunc = gl_save_StencilFunc;
508 table->StencilMask = gl_save_StencilMask;
509 table->StencilOp = gl_save_StencilOp;
510 table->TexCoord2f = gl_save_TexCoord2f;
511 table->TexCoord4f = gl_save_TexCoord4f;
512 table->TexCoordPointer = gl_TexCoordPointer; /* NOT SAVED */
513 table->TexEnvfv = gl_save_TexEnvfv;
514 table->TexGenfv = gl_save_TexGenfv;
515 table->TexImage1D = gl_save_TexImage1D;
516 table->TexImage2D = gl_save_TexImage2D;
517 table->TexSubImage1D = gl_save_TexSubImage1D;
518 table->TexSubImage2D = gl_save_TexSubImage2D;
519 table->TexParameterfv = gl_save_TexParameterfv;
520 table->Translatef = gl_save_Translatef;
521 table->Vertex2f = gl_save_Vertex2f;
522 table->Vertex3f = gl_save_Vertex3f;
523 table->Vertex4f = gl_save_Vertex4f;
524 table->Vertex3fv = gl_save_Vertex3fv;
525 table->VertexPointer = gl_VertexPointer; /* NOT SAVED */
526 table->Viewport = gl_save_Viewport;
527 }
528
529
530
gl_init_api_function_pointers(GLcontext * ctx)531 void gl_init_api_function_pointers( GLcontext *ctx )
532 {
533 init_exec_pointers( &ctx->Exec );
534
535 init_dlist_pointers( &ctx->Save );
536
537 /* make sure there's no NULL pointers */
538 check_pointers( &ctx->Exec );
539 check_pointers( &ctx->Save );
540 }
541
542