oglforeign.c.c
Go to the documentation of this file.
1 /* $Header$ */
2 
3 /* OpenGL function entries -- based on xwindow/xforeign.c */
4 
5 #include <dlfcn.h>
6 
7 #include <GL/gl.h>
8 #include "util.h"
9 
10 #pragma init (init_object_module)
11 
13 
14 extern pointer sysmod;
15 
16 #if BUG_dl
17 static void *xlib_handle;
18 #endif
19 
21 register context *ctx;
22 char *xentry;
23 { pointer fc, xsym;
24  eusinteger_t entry; int i, len;
25  char lname[100];
26  len=strlen(xentry);
27  for (i=0; i<len; i++) lname[i]=toupper(xentry[i]);
28  lname[i]=0;
29 #if Cygwin /* dlopen libGL.dll and libGLU.dll */
30  eusinteger_t dlhandle;
31  dlhandle=(eusinteger_t)dlopen("cygGL-1.dll", RTLD_LAZY);
32  entry=(eusinteger_t)dlsym((eusinteger_t)dlhandle, xentry);
33  if ( !entry ) {
34  dlhandle=(eusinteger_t)dlopen("cygGLU-1.dll", RTLD_LAZY);
35  entry=(eusinteger_t)dlsym(dlhandle, xentry);}
36  if ( !entry ) {
37  dlhandle=(eusinteger_t)dlopen(0, RTLD_LAZY);
38  entry=(eusinteger_t)dlsym(dlhandle, xentry);}
39 #elif Darwin
40  eusinteger_t dlhandle;
41  dlhandle=(eusinteger_t)dlopen(0, RTLD_LAZY);
42  entry=(eusinteger_t)dlsym(dlhandle, xentry);
43 #else
44 #if (WORD_SIZE == 64)
45  entry=(eusinteger_t)dlsym((void *)((eusinteger_t)(sysmod->c.ldmod.handle) & ~3L), xentry);
46 #else
47  entry=(eusinteger_t)dlsym((void *)((eusinteger_t)(sysmod->c.ldmod.handle) & ~3), xentry);
48 #endif
49 #endif
50  if (!entry) {
51  fprintf(stderr, "defoglforeign: dlsym() failed for %s\n", xentry);
52  }
53  xsym=intern(ctx,lname, len, glpkg);
54  fc=makeobject(C_FCODE);
55  xsym->c.sym.spefunc=fc;
56  fc->c.fcode.codevec=makeint(0);
57  fc->c.fcode.quotevec=makeint(0);
58  fc->c.fcode.subrtype=SUBR_FUNCTION;
59  fc->c.fcode.paramtypes=NIL;
61  fc->c.fcode.entry=makeint(entry>>2);
62  fc->c.fcode.entry2=makeint(entry); /* kanehiro's patch 2000.12.13 */
63  /*printf("x: %s at %x, %x\n", xsym->c.sym.pname->c.str.chars, entry, fc->c.fcode.entry);*/
64  export(xsym,glpkg);
65  return(xsym);}
66 
67 pointer oglforeign(ctx,n,argv)
68 register context *ctx;
69 int n;
70 pointer argv[];
71 {
72  glpkg= makepkg(ctx,makestring("GL",2),NIL,rawcons(ctx,lisppkg,NIL));
73 
74  defoglforeign(ctx,"glAccum");
75  defoglforeign(ctx,"glAlphaFunc");
76  defoglforeign(ctx,"glBegin");
77  defoglforeign(ctx,"glBitmap");
78  defoglforeign(ctx,"glBlendFunc");
79  defoglforeign(ctx,"glCallList");
80  defoglforeign(ctx,"glCallLists");
81  defoglforeign(ctx,"glClear");
82  defoglforeign(ctx,"glClearAccum");
83  defoglforeign(ctx,"glClearColor");
84  defoglforeign(ctx,"glClearDepth");
85  defoglforeign(ctx,"glClearIndex");
86  defoglforeign(ctx,"glClearStencil");
87  defoglforeign(ctx,"glClipPlane");
88  defoglforeign(ctx,"glColor3b");
89  defoglforeign(ctx,"glColor3bv");
90  defoglforeign(ctx,"glColor3d");
91  defoglforeign(ctx,"glColor3dv");
92  defoglforeign(ctx,"glColor3f");
93  defoglforeign(ctx,"glColor3fv");
94  defoglforeign(ctx,"glColor3i");
95  defoglforeign(ctx,"glColor3iv");
96  defoglforeign(ctx,"glColor3s");
97  defoglforeign(ctx,"glColor3sv");
98  defoglforeign(ctx,"glColor3ub");
99  defoglforeign(ctx,"glColor3ubv");
100  defoglforeign(ctx,"glColor3ui");
101  defoglforeign(ctx,"glColor3uiv");
102  defoglforeign(ctx,"glColor3us");
103  defoglforeign(ctx,"glColor3usv");
104  defoglforeign(ctx,"glColor4b");
105  defoglforeign(ctx,"glColor4bv");
106  defoglforeign(ctx,"glColor4d");
107  defoglforeign(ctx,"glColor4dv");
108  defoglforeign(ctx,"glColor4f");
109  defoglforeign(ctx,"glColor4fv");
110  defoglforeign(ctx,"glColor4i");
111  defoglforeign(ctx,"glColor4iv");
112  defoglforeign(ctx,"glColor4s");
113  defoglforeign(ctx,"glColor4sv");
114  defoglforeign(ctx,"glColor4ub");
115  defoglforeign(ctx,"glColor4ubv");
116  defoglforeign(ctx,"glColor4ui");
117  defoglforeign(ctx,"glColor4uiv");
118  defoglforeign(ctx,"glColor4us");
119  defoglforeign(ctx,"glColor4usv");
120  defoglforeign(ctx,"glColorMask");
121  defoglforeign(ctx,"glColorMaterial");
122  defoglforeign(ctx,"glCopyPixels");
123  defoglforeign(ctx,"glCullFace");
124  defoglforeign(ctx,"glDeleteLists");
125  defoglforeign(ctx,"glDepthFunc");
126  defoglforeign(ctx,"glDepthMask");
127  defoglforeign(ctx,"glDepthRange");
128  defoglforeign(ctx,"glDisable");
129  defoglforeign(ctx,"glDrawBuffer");
130  defoglforeign(ctx,"glDrawPixels");
131  defoglforeign(ctx,"glEdgeFlag");
132  defoglforeign(ctx,"glEdgeFlagv");
133  defoglforeign(ctx,"glEnable");
134  defoglforeign(ctx,"glEnd");
135  defoglforeign(ctx,"glEndList");
136  defoglforeign(ctx,"glEvalCoord1d");
137  defoglforeign(ctx,"glEvalCoord1dv");
138  defoglforeign(ctx,"glEvalCoord1f");
139  defoglforeign(ctx,"glEvalCoord1fv");
140  defoglforeign(ctx,"glEvalCoord2d");
141  defoglforeign(ctx,"glEvalCoord2dv");
142  defoglforeign(ctx,"glEvalCoord2f");
143  defoglforeign(ctx,"glEvalCoord2fv");
144  defoglforeign(ctx,"glEvalMesh1");
145  defoglforeign(ctx,"glEvalMesh2");
146  defoglforeign(ctx,"glEvalPoint1");
147  defoglforeign(ctx,"glEvalPoint2");
148  defoglforeign(ctx,"glFeedbackBuffer");
149  defoglforeign(ctx,"glFinish");
150  defoglforeign(ctx,"glFlush");
151  defoglforeign(ctx,"glFogf");
152  defoglforeign(ctx,"glFogfv");
153  defoglforeign(ctx,"glFogi");
154  defoglforeign(ctx,"glFogiv");
155  defoglforeign(ctx,"glFrontFace");
156  defoglforeign(ctx,"glFrustum");
157  defoglforeign(ctx,"glGenLists");
158  defoglforeign(ctx,"glGetBooleanv");
159  defoglforeign(ctx,"glGetClipPlane");
160  defoglforeign(ctx,"glGetDoublev");
161  defoglforeign(ctx,"glGetError");
162  defoglforeign(ctx,"glGetFloatv");
163  defoglforeign(ctx,"glGetIntegerv");
164  defoglforeign(ctx,"glGetLightfv");
165  defoglforeign(ctx,"glGetLightiv");
166  defoglforeign(ctx,"glGetMapdv");
167  defoglforeign(ctx,"glGetMapfv");
168  defoglforeign(ctx,"glGetMapiv");
169  defoglforeign(ctx,"glGetMaterialfv");
170  defoglforeign(ctx,"glGetMaterialiv");
171  defoglforeign(ctx,"glGetPixelMapfv");
172  defoglforeign(ctx,"glGetPixelMapuiv");
173  defoglforeign(ctx,"glGetPixelMapusv");
174  defoglforeign(ctx,"glGetPolygonStipple");
175  defoglforeign(ctx,"glGetString");
176  defoglforeign(ctx,"glGetTexEnvfv");
177  defoglforeign(ctx,"glGetTexEnviv");
178  defoglforeign(ctx,"glGetTexGendv");
179  defoglforeign(ctx,"glGetTexGenfv");
180  defoglforeign(ctx,"glGetTexGeniv");
181  defoglforeign(ctx,"glGetTexImage");
182  defoglforeign(ctx,"glGetTexLevelParameterfv");
183  defoglforeign(ctx,"glGetTexLevelParameteriv");
184  defoglforeign(ctx,"glGetTexParameterfv");
185  defoglforeign(ctx,"glGetTexParameteriv");
186  defoglforeign(ctx,"glHint");
187  defoglforeign(ctx,"glIndexMask");
188  defoglforeign(ctx,"glIndexd");
189  defoglforeign(ctx,"glIndexdv");
190  defoglforeign(ctx,"glIndexf");
191  defoglforeign(ctx,"glIndexfv");
192  defoglforeign(ctx,"glIndexi");
193  defoglforeign(ctx,"glIndexiv");
194  defoglforeign(ctx,"glIndexs");
195  defoglforeign(ctx,"glIndexsv");
196  defoglforeign(ctx,"glInitNames");
197  defoglforeign(ctx,"glIsEnabled");
198  defoglforeign(ctx,"glIsList");
199  defoglforeign(ctx,"glLightModelf");
200  defoglforeign(ctx,"glLightModelfv");
201  defoglforeign(ctx,"glLightModeli");
202  defoglforeign(ctx,"glLightModeliv");
203  defoglforeign(ctx,"glLightf");
204  defoglforeign(ctx,"glLightfv");
205  defoglforeign(ctx,"glLighti");
206  defoglforeign(ctx,"glLightiv");
207  defoglforeign(ctx,"glLineStipple");
208  defoglforeign(ctx,"glLineWidth");
209  defoglforeign(ctx,"glListBase");
210  defoglforeign(ctx,"glLoadIdentity");
211  defoglforeign(ctx,"glLoadMatrixd");
212  defoglforeign(ctx,"glLoadMatrixf");
213  defoglforeign(ctx,"glLoadName");
214  defoglforeign(ctx,"glLogicOp");
215  defoglforeign(ctx,"glMap1d");
216  defoglforeign(ctx,"glMap1f");
217  defoglforeign(ctx,"glMap2d");
218  defoglforeign(ctx,"glMap2f");
219  defoglforeign(ctx,"glMapGrid1d");
220  defoglforeign(ctx,"glMapGrid1f");
221  defoglforeign(ctx,"glMapGrid2d");
222  defoglforeign(ctx,"glMapGrid2f");
223  defoglforeign(ctx,"glMaterialf");
224  defoglforeign(ctx,"glMaterialfv");
225  defoglforeign(ctx,"glMateriali");
226  defoglforeign(ctx,"glMaterialiv");
227  defoglforeign(ctx,"glMatrixMode");
228  defoglforeign(ctx,"glMultMatrixd");
229  defoglforeign(ctx,"glMultMatrixf");
230  defoglforeign(ctx,"glNewList");
231  defoglforeign(ctx,"glNormal3b");
232  defoglforeign(ctx,"glNormal3bv");
233  defoglforeign(ctx,"glNormal3d");
234  defoglforeign(ctx,"glNormal3dv");
235  defoglforeign(ctx,"glNormal3f");
236  defoglforeign(ctx,"glNormal3fv");
237  defoglforeign(ctx,"glNormal3i");
238  defoglforeign(ctx,"glNormal3iv");
239  defoglforeign(ctx,"glNormal3s");
240  defoglforeign(ctx,"glNormal3sv");
241  defoglforeign(ctx,"glOrtho");
242  defoglforeign(ctx,"glPassThrough");
243  defoglforeign(ctx,"glPixelMapfv");
244  defoglforeign(ctx,"glPixelMapuiv");
245  defoglforeign(ctx,"glPixelMapusv");
246  defoglforeign(ctx,"glPixelStoref");
247  defoglforeign(ctx,"glPixelStorei");
248  defoglforeign(ctx,"glPixelTransferf");
249  defoglforeign(ctx,"glPixelTransferi");
250  defoglforeign(ctx,"glPixelZoom");
251  defoglforeign(ctx,"glPointSize");
252  defoglforeign(ctx,"glPolygonMode");
253  defoglforeign(ctx,"glPolygonStipple");
254  defoglforeign(ctx,"glPopAttrib");
255  defoglforeign(ctx,"glPopMatrix");
256  defoglforeign(ctx,"glPopName");
257  defoglforeign(ctx,"glPushAttrib");
258  defoglforeign(ctx,"glPushMatrix");
259  defoglforeign(ctx,"glPushName");
260  defoglforeign(ctx,"glRasterPos2d");
261  defoglforeign(ctx,"glRasterPos2dv");
262  defoglforeign(ctx,"glRasterPos2f");
263  defoglforeign(ctx,"glRasterPos2fv");
264  defoglforeign(ctx,"glRasterPos2i");
265  defoglforeign(ctx,"glRasterPos2iv");
266  defoglforeign(ctx,"glRasterPos2s");
267  defoglforeign(ctx,"glRasterPos2sv");
268  defoglforeign(ctx,"glRasterPos3d");
269  defoglforeign(ctx,"glRasterPos3dv");
270  defoglforeign(ctx,"glRasterPos3f");
271  defoglforeign(ctx,"glRasterPos3fv");
272  defoglforeign(ctx,"glRasterPos3i");
273  defoglforeign(ctx,"glRasterPos3iv");
274  defoglforeign(ctx,"glRasterPos3s");
275  defoglforeign(ctx,"glRasterPos3sv");
276  defoglforeign(ctx,"glRasterPos4d");
277  defoglforeign(ctx,"glRasterPos4dv");
278  defoglforeign(ctx,"glRasterPos4f");
279  defoglforeign(ctx,"glRasterPos4fv");
280  defoglforeign(ctx,"glRasterPos4i");
281  defoglforeign(ctx,"glRasterPos4iv");
282  defoglforeign(ctx,"glRasterPos4s");
283  defoglforeign(ctx,"glRasterPos4sv");
284  defoglforeign(ctx,"glReadBuffer");
285  defoglforeign(ctx,"glReadPixels");
286  defoglforeign(ctx,"glRectd");
287  defoglforeign(ctx,"glRectdv");
288  defoglforeign(ctx,"glRectf");
289  defoglforeign(ctx,"glRectfv");
290  defoglforeign(ctx,"glRecti");
291  defoglforeign(ctx,"glRectiv");
292  defoglforeign(ctx,"glRects");
293  defoglforeign(ctx,"glRectsv");
294  defoglforeign(ctx,"glRenderMode");
295  defoglforeign(ctx,"glRotated");
296  defoglforeign(ctx,"glRotatef");
297  defoglforeign(ctx,"glScaled");
298  defoglforeign(ctx,"glScalef");
299  defoglforeign(ctx,"glScissor");
300  defoglforeign(ctx,"glSelectBuffer");
301  defoglforeign(ctx,"glShadeModel");
302  defoglforeign(ctx,"glStencilFunc");
303  defoglforeign(ctx,"glStencilMask");
304  defoglforeign(ctx,"glStencilOp");
305  defoglforeign(ctx,"glTexCoord1d");
306  defoglforeign(ctx,"glTexCoord1dv");
307  defoglforeign(ctx,"glTexCoord1f");
308  defoglforeign(ctx,"glTexCoord1fv");
309  defoglforeign(ctx,"glTexCoord1i");
310  defoglforeign(ctx,"glTexCoord1iv");
311  defoglforeign(ctx,"glTexCoord1s");
312  defoglforeign(ctx,"glTexCoord1sv");
313  defoglforeign(ctx,"glTexCoord2d");
314  defoglforeign(ctx,"glTexCoord2dv");
315  defoglforeign(ctx,"glTexCoord2f");
316  defoglforeign(ctx,"glTexCoord2fv");
317  defoglforeign(ctx,"glTexCoord2i");
318  defoglforeign(ctx,"glTexCoord2iv");
319  defoglforeign(ctx,"glTexCoord2s");
320  defoglforeign(ctx,"glTexCoord2sv");
321  defoglforeign(ctx,"glTexCoord3d");
322  defoglforeign(ctx,"glTexCoord3dv");
323  defoglforeign(ctx,"glTexCoord3f");
324  defoglforeign(ctx,"glTexCoord3fv");
325  defoglforeign(ctx,"glTexCoord3i");
326  defoglforeign(ctx,"glTexCoord3iv");
327  defoglforeign(ctx,"glTexCoord3s");
328  defoglforeign(ctx,"glTexCoord3sv");
329  defoglforeign(ctx,"glTexCoord4d");
330  defoglforeign(ctx,"glTexCoord4dv");
331  defoglforeign(ctx,"glTexCoord4f");
332  defoglforeign(ctx,"glTexCoord4fv");
333  defoglforeign(ctx,"glTexCoord4i");
334  defoglforeign(ctx,"glTexCoord4iv");
335  defoglforeign(ctx,"glTexCoord4s");
336  defoglforeign(ctx,"glTexCoord4sv");
337  defoglforeign(ctx,"glTexEnvf");
338  defoglforeign(ctx,"glTexEnvfv");
339  defoglforeign(ctx,"glTexEnvi");
340  defoglforeign(ctx,"glTexEnviv");
341  defoglforeign(ctx,"glTexGend");
342  defoglforeign(ctx,"glTexGendv");
343  defoglforeign(ctx,"glTexGenf");
344  defoglforeign(ctx,"glTexGenfv");
345  defoglforeign(ctx,"glTexGeni");
346  defoglforeign(ctx,"glTexGeniv");
347  defoglforeign(ctx,"glTexImage1D");
348  defoglforeign(ctx,"glTexImage2D");
349  defoglforeign(ctx,"glTexParameterf");
350  defoglforeign(ctx,"glTexParameterfv");
351  defoglforeign(ctx,"glTexParameteri");
352  defoglforeign(ctx,"glTexParameteriv");
353  defoglforeign(ctx,"glTranslated");
354  defoglforeign(ctx,"glTranslatef");
355  defoglforeign(ctx,"glVertex2d");
356  defoglforeign(ctx,"glVertex2dv");
357  defoglforeign(ctx,"glVertex2f");
358  defoglforeign(ctx,"glVertex2fv");
359  defoglforeign(ctx,"glVertex2i");
360  defoglforeign(ctx,"glVertex2iv");
361  defoglforeign(ctx,"glVertex2s");
362  defoglforeign(ctx,"glVertex2sv");
363  defoglforeign(ctx,"glVertex3d");
364  defoglforeign(ctx,"glVertex3dv");
365  defoglforeign(ctx,"glVertex3f");
366  defoglforeign(ctx,"glVertex3fv");
367  defoglforeign(ctx,"glVertex3i");
368  defoglforeign(ctx,"glVertex3iv");
369  defoglforeign(ctx,"glVertex3s");
370  defoglforeign(ctx,"glVertex3sv");
371  defoglforeign(ctx,"glVertex4d");
372  defoglforeign(ctx,"glVertex4dv");
373  defoglforeign(ctx,"glVertex4f");
374  defoglforeign(ctx,"glVertex4fv");
375  defoglforeign(ctx,"glVertex4i");
376  defoglforeign(ctx,"glVertex4iv");
377  defoglforeign(ctx,"glVertex4s");
378  defoglforeign(ctx,"glVertex4sv");
379  defoglforeign(ctx,"glViewport");
380  defoglforeign(ctx,"gluErrorString");
381  defoglforeign(ctx,"gluOrtho2D");
382  defoglforeign(ctx,"gluPerspective");
383  defoglforeign(ctx,"gluPickMatrix");
384  defoglforeign(ctx,"gluLookAt");
385  defoglforeign(ctx,"gluProject");
386  defoglforeign(ctx,"gluUnProject");
387  defoglforeign(ctx,"gluScaleImage");
388  defoglforeign(ctx,"gluBuild1DMipmaps");
389  defoglforeign(ctx,"gluBuild2DMipmaps");
390  defoglforeign(ctx,"gluNewQuadric");
391  defoglforeign(ctx,"gluDeleteQuadric");
392  defoglforeign(ctx,"gluQuadricNormals");
393  defoglforeign(ctx,"gluQuadricTexture");
394  defoglforeign(ctx,"gluQuadricOrientation");
395  defoglforeign(ctx,"gluQuadricDrawStyle");
396  defoglforeign(ctx,"gluCylinder");
397  defoglforeign(ctx,"gluDisk");
398  defoglforeign(ctx,"gluPartialDisk");
399  defoglforeign(ctx,"gluSphere");
400  defoglforeign(ctx,"gluQuadricCallback");
401  defoglforeign(ctx,"gluNewTess");
402  defoglforeign(ctx,"gluTessCallback");
403  defoglforeign(ctx,"gluDeleteTess");
404  defoglforeign(ctx,"gluBeginPolygon");
405  defoglforeign(ctx,"gluEndPolygon");
406  defoglforeign(ctx,"gluNextContour");
407  defoglforeign(ctx,"gluTessVertex");
408  defoglforeign(ctx,"gluNewNurbsRenderer");
409  defoglforeign(ctx,"gluDeleteNurbsRenderer");
410  defoglforeign(ctx,"gluBeginSurface");
411  defoglforeign(ctx,"gluBeginCurve");
412  defoglforeign(ctx,"gluEndCurve");
413  defoglforeign(ctx,"gluEndSurface");
414  defoglforeign(ctx,"gluBeginTrim");
415  defoglforeign(ctx,"gluEndTrim");
416  defoglforeign(ctx,"gluPwlCurve");
417  defoglforeign(ctx,"gluNurbsCurve");
418  defoglforeign(ctx,"gluNurbsSurface");
419  defoglforeign(ctx,"gluLoadSamplingMatrices");
420  defoglforeign(ctx,"gluNurbsProperty");
421  defoglforeign(ctx,"gluGetNurbsProperty");
422  defoglforeign(ctx,"gluNurbsCallback");
423  defoglforeign(ctx,"glXChooseVisual");
424  defoglforeign(ctx,"glXCopyContext");
425  defoglforeign(ctx,"glXCreateContext");
426  defoglforeign(ctx,"glXCreateGLXPixmap");
427  defoglforeign(ctx,"glXDestroyContext");
428  defoglforeign(ctx,"glXDestroyGLXPixmap");
429  defoglforeign(ctx,"glXGetConfig");
430  defoglforeign(ctx,"glXGetCurrentContext");
431  defoglforeign(ctx,"glXGetCurrentDrawable");
432  defoglforeign(ctx,"glXIsDirect");
433  defoglforeign(ctx,"glXMakeCurrent");
434  defoglforeign(ctx,"glXQueryExtension");
435  defoglforeign(ctx,"glXQueryVersion");
436  defoglforeign(ctx,"glXSwapBuffers");
437  defoglforeign(ctx,"glXUseXFont");
438  defoglforeign(ctx,"glXWaitGL");
439  defoglforeign(ctx,"glXWaitX");
440 #if !Cygwin && !Linux /* Cygwin does not have tkInitDisplayMode, etc... */
441  /*defoglforeign(ctx,"tkInitDisplay");*/
442  defoglforeign(ctx,"tkInitDisplayMode");
443  /*defoglforeign(ctx,"tkInitDisplayModePolicy");*/
444  /*defoglforeign(ctx,"tkInitDisplayModeID");*/
445  defoglforeign(ctx,"tkInitPosition");
446  defoglforeign(ctx,"tkInitWindow");
447  defoglforeign(ctx,"tkCloseWindow");
448  defoglforeign(ctx,"tkQuit");
449  defoglforeign(ctx,"tkSetWindowLevel");
450  defoglforeign(ctx,"tkSwapBuffers");
451  defoglforeign(ctx,"tkExec");
452  defoglforeign(ctx,"tkExposeFunc");
453  defoglforeign(ctx,"tkReshapeFunc");
454  defoglforeign(ctx,"tkDisplayFunc");
455  defoglforeign(ctx,"tkKeyDownFunc");
456  defoglforeign(ctx,"tkMouseDownFunc");
457  defoglforeign(ctx,"tkMouseUpFunc");
458  defoglforeign(ctx,"tkMouseMoveFunc");
459  defoglforeign(ctx,"tkIdleFunc");
460  defoglforeign(ctx,"tkGetColorMapSize");
461  defoglforeign(ctx,"tkGetMouseLoc");
462  defoglforeign(ctx,"tkGetSystem");
463  /*defoglforeign(ctx,"tkGetDisplayModePolicy");*/
464  /*defoglforeign(ctx,"tkGetDisplayModeID");*/
465  /*defoglforeign(ctx,"tkGetDisplayMode");*/
466  /*defoglforeign(ctx,"tkGetContext");*/
467  defoglforeign(ctx,"tkSetOneColor");
468  defoglforeign(ctx,"tkSetFogRamp");
469  defoglforeign(ctx,"tkSetGreyRamp");
470  defoglforeign(ctx,"tkSetRGBMap");
471  defoglforeign(ctx,"tkSetOverlayMap");
472  defoglforeign(ctx,"tkNewCursor");
473  defoglforeign(ctx,"tkSetCursor");
474  defoglforeign(ctx,"tkRGBImageLoad");
475  defoglforeign(ctx,"tkCreateStrokeFont");
476  defoglforeign(ctx,"tkCreateOutlineFont");
477  defoglforeign(ctx,"tkCreateFilledFont");
478  defoglforeign(ctx,"tkCreateBitmapFont");
479  defoglforeign(ctx,"tkDrawStr");
480  defoglforeign(ctx,"tkWireSphere");
481  defoglforeign(ctx,"tkSolidSphere");
482  defoglforeign(ctx,"tkWireCube");
483  defoglforeign(ctx,"tkSolidCube");
484  defoglforeign(ctx,"tkWireBox");
485  defoglforeign(ctx,"tkSolidBox");
486  defoglforeign(ctx,"tkWireTorus");
487  defoglforeign(ctx,"tkSolidTorus");
488  defoglforeign(ctx,"tkWireCylinder");
489  defoglforeign(ctx,"tkSolidCylinder");
490  defoglforeign(ctx,"tkWireCone");
491  defoglforeign(ctx,"tkSolidCone");
492 #endif
493 /* defoglforeign(ctx,"auxInitDisplayMode"); */
494 #ifdef IRIX
495  /*defoglforeign(ctx,"auxInitDisplayModePolicy");*/
496  /*defoglforeign(ctx,"auxInitDisplayModeID");*/
497 #endif
498 /* defoglforeign(ctx,"auxInitPosition");
499  defoglforeign(ctx,"auxInitWindow");
500  defoglforeign(ctx,"auxCloseWindow");
501  defoglforeign(ctx,"auxQuit");
502  defoglforeign(ctx,"auxSwapBuffers");
503  defoglforeign(ctx,"auxXDisplay");
504  defoglforeign(ctx,"auxXWindow"); */
505 #ifdef IRIX
506  /*defoglforeign(ctx,"auxXScreen");*/
507 #endif
508 /* defoglforeign(ctx,"auxMainLoop");
509  defoglforeign(ctx,"auxExposeFunc");
510  defoglforeign(ctx,"auxReshapeFunc");
511  defoglforeign(ctx,"auxIdleFunc");
512  defoglforeign(ctx,"auxKeyFunc");
513  defoglforeign(ctx,"auxMouseFunc");
514  defoglforeign(ctx,"auxGetColorMapSize");
515  defoglforeign(ctx,"auxGetMouseLoc"); */
516 #ifdef IRIX
517  /*defoglforeign(ctx,"auxGetDisplayModePolicy");*/
518  /*defoglforeign(ctx,"auxGetDisplayModeID");*/
519  /*defoglforeign(ctx,"auxGetDisplayMode");*/
520  /*defoglforeign(ctx,"auxGetContext");*/
521 #endif
522 /* defoglforeign(ctx,"auxSetOneColor");
523  defoglforeign(ctx,"auxSetFogRamp");
524  defoglforeign(ctx,"auxSetGreyRamp");
525  defoglforeign(ctx,"auxSetRGBMap");
526  defoglforeign(ctx,"auxRGBImageLoad");
527  defoglforeign(ctx,"auxCreateFont");
528  defoglforeign(ctx,"auxDrawStr");
529  defoglforeign(ctx,"auxWireSphere");
530  defoglforeign(ctx,"auxSolidSphere");
531  defoglforeign(ctx,"auxWireCube");
532  defoglforeign(ctx,"auxSolidCube");
533  defoglforeign(ctx,"auxWireBox");
534  defoglforeign(ctx,"auxSolidBox");
535  defoglforeign(ctx,"auxWireTorus");
536  defoglforeign(ctx,"auxSolidTorus");
537  defoglforeign(ctx,"auxWireCylinder");
538  defoglforeign(ctx,"auxSolidCylinder");
539  defoglforeign(ctx,"auxWireIcosahedron");
540  defoglforeign(ctx,"auxSolidIcosahedron");
541  defoglforeign(ctx,"auxWireOctahedron");
542  defoglforeign(ctx,"auxSolidOctahedron");
543  defoglforeign(ctx,"auxWireTetrahedron");
544  defoglforeign(ctx,"auxSolidTetrahedron");
545  defoglforeign(ctx,"auxWireDodecahedron");
546  defoglforeign(ctx,"auxSolidDodecahedron");
547  defoglforeign(ctx,"auxWireCone");
548  defoglforeign(ctx,"auxSolidCone");
549  defoglforeign(ctx,"auxWireTeapot");
550  defoglforeign(ctx,"auxSolidTeapot"); */
551  defoglforeign(ctx,"glClearColorfv");
552  defoglforeign(ctx,"glOrtho6f");
553  defoglforeign(ctx,"glOrthofv");
554  defoglforeign(ctx,"glRotatefv");
555  defoglforeign(ctx,"glTranslatefv");
556 /* defoglforeign(ctx,"auxSolidTeapotfv"); */
557  defoglforeign(ctx,"glClipPlanef");
558 /* defoglforeign(ctx,"auxSolidSpherefv");
559  defoglforeign(ctx,"auxWireSpherefv");
560  defoglforeign(ctx,"auxSolidCylinderfv");
561  defoglforeign(ctx,"auxSolidConefv");
562  defoglforeign(ctx,"auxSolidBoxfv"); */
563  defoglforeign(ctx,"gluPerspectivefv");
564  defoglforeign(ctx,"gluLookAtfv");
565  defoglforeign(ctx,"gluTessCallbackl");
566 /* defoglforeign(ctx,"auxSolidTorusfv");
567  defoglforeign(ctx,"auxSolidCubefv");
568  defoglforeign(ctx,"auxSolidOctahedronfv"); */
569  defoglforeign(ctx,"glClearAccumfv");
570  defoglforeign(ctx,"glAccumfv");
571  defoglforeign(ctx,"gluDiskfv");
572  defoglforeign(ctx,"gluPartialDiskfv");
573 /* defoglforeign(ctx,"auxWireIcosahedronfv"); */
574  defoglforeign(ctx,"glScalefv");
575  defoglforeign(ctx,"gluNurbsPropertyfv");
576  defoglforeign(ctx,"glMapGrid2fv");
577  defoglforeign(ctx,"glBitmapfv");
578  defoglforeign(ctx,"glMap1fv");
579  defoglforeign(ctx,"glMap2fv");
580 /* defoglforeign(ctx,"auxSetOneColorfv"); */
581  defoglforeign(ctx,"glFrustumfv");
582  defoglforeign(ctx,"gluOrtho2Dfv");
583  defoglforeign(ctx,"glPointSizefv");
584  defoglforeign(ctx,"glClearIndexfv");
585  defoglforeign(ctx,"alloctessinfo");
586  defoglforeign(ctx,"tess_vertex_cb");
587  defoglforeign(ctx,"glDepthRangefv");
588 #if (WORD_SIZE == 64)
589  defoglforeign(ctx,"glPointSized");
590  defoglforeign(ctx,"glLineWidthd");
591  defoglforeign(ctx,"gluNurbsPropertyd");
592 #endif
593  /* kanehiro's glu patch 2000.12.13 */
594  defoglforeign(ctx,"gluTessBeginContour");
595  defoglforeign(ctx,"gluTessEndContour");
596  defoglforeign(ctx,"gluTessBeginPolygon");
597  defoglforeign(ctx,"gluTessEndPolygon");
598 
599 #if GL_EXT_texture_object && !Darwin
600  defoglforeign(ctx,"glGenTexturesEXT");
601  defoglforeign(ctx,"glBindTextureEXT");
602 #else
603  defoglforeign(ctx,"glGenTextures");
604  defoglforeign(ctx,"glBindTexture");
605 #endif
606 #if 0 /* GL_EXT_polygon_offset */
607  defoglforeign(ctx,"glPolygonOffsetEXT");
608  defoglforeign(ctx,"glPolygonOffsetEXTfv");
609 #endif
610 
611  return(argv[0]);}
612 
613 static void init_object_module()
614  { add_module_initializer("oglforeign", oglforeign);}
NIL
pointer NIL
Definition: eus.c:110
fcode::paramtypes
pointer paramtypes
Definition: eus.h:246
fcode::entry
pointer entry
Definition: eus.h:244
makeint
#define makeint(v)
Definition: sfttest.c:2
context
Definition: eus.h:524
fcode::subrtype
pointer subrtype
Definition: eus.h:243
glpkg
pointer glpkg
Definition: oglforeign.c.c:12
symbol::spefunc
pointer spefunc
Definition: eus.h:206
oglforeign
pointer oglforeign(context *ctx, int n, argv)
Definition: oglforeign.c.c:67
fcode::codevec
pointer codevec
Definition: eus.h:241
add_module_initializer
void add_module_initializer(char *, pointer(*)())
Definition: loadelf.c:86
fcode::entry2
pointer entry2
Definition: eus.h:245
cell::cellunion::sym
struct symbol sym
Definition: eus.h:401
makestring
pointer makestring(char *, int)
Definition: makes.c:147
makeobject
pointer makeobject(pointer)
Definition: makes.c:407
sysmod
pointer sysmod
Definition: eus.c:184
rawcons
pointer rawcons(context *, pointer, pointer)
Definition: makes.c:86
cell::cellunion::fcode
struct fcode fcode
Definition: eus.h:409
intern
pointer intern(context *, char *, int, pointer)
Definition: intern.c:105
cell::c
union cell::cellunion c
cell::cellunion::ldmod
struct ldmodule ldmod
Definition: eus.h:410
K_INTEGER
pointer K_INTEGER
Definition: eus.c:132
ldmodule::handle
pointer handle
Definition: eus.h:259
lisppkg
pointer lisppkg
Definition: eus.c:109
fcode::resulttype
pointer resulttype
Definition: eus.h:247
cell
Definition: eus.h:381
export
#define export
Definition: test_foreign.c:12
eusinteger_t
long eusinteger_t
Definition: eus.h:19
makepkg
pointer makepkg(context *, pointer, pointer, pointer)
Definition: makes.c:201
defoglforeign
pointer defoglforeign(context *ctx, char *xentry)
Definition: oglforeign.c.c:20
fcode::quotevec
pointer quotevec
Definition: eus.h:242
init_object_module
static void init_object_module()
Definition: oglforeign.c.c:613
C_FCODE
pointer C_FCODE
Definition: eus.c:143
util.h
n
GLfloat n[6][3]
Definition: cube.c:15


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43