ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.52 by root, Wed Apr 19 21:17:15 2006 UTC vs.
Revision 1.62 by root, Mon Apr 24 02:41:47 2006 UTC

33 typedef signed char int8_t; 33 typedef signed char int8_t;
34 typedef signed short int16_t; 34 typedef signed short int16_t;
35 typedef signed int int32_t; 35 typedef signed int int32_t;
36#endif 36#endif
37 37
38#include "glext.h"
39
38#define FOW_DARKNESS 32 40#define FOW_DARKNESS 32
39 41
40#define MAP_EXTEND_X 32 42#define MAP_EXTEND_X 32
41#define MAP_EXTEND_Y 512 43#define MAP_EXTEND_Y 512
42 44
45#define MIN_FONT_HEIGHT 8
46
43typedef Mix_Chunk *CFClient__MixChunk; 47typedef Mix_Chunk *CFClient__MixChunk;
44typedef Mix_Music *CFClient__MixMusic; 48typedef Mix_Music *CFClient__MixMusic;
45 49
46static PangoContext *context; 50typedef PangoFontDescription *CFClient__Font;
47static PangoFontMap *fontmap;
48 51
49typedef struct cf_layout { 52typedef struct cf_layout {
50 PangoLayout *pl; 53 PangoLayout *pl;
51 int base_height; 54 int base_height;
55 CFClient__Font font;
52} *CFClient__Layout; 56} *CFClient__Layout;
57
58static CFClient__Font default_font;
59static PangoContext *context;
60static PangoFontMap *fontmap;
53 61
54static void 62static void
55substitute_func (FcPattern *pattern, gpointer data) 63substitute_func (FcPattern *pattern, gpointer data)
56{ 64{
57 FcPatternAddBool (pattern, FC_HINTING , 1); 65 FcPatternAddBool (pattern, FC_HINTING , 1);
58 FcPatternAddBool (pattern, FC_AUTOHINT, 0); 66 FcPatternAddBool (pattern, FC_AUTOHINT, 0);
59} 67}
60 68
61static void 69static void
62layout_update (CFClient__Layout self) 70layout_update_font (CFClient__Layout self)
63{ 71{
64 /* use a random scale factor to account for unknown descenders, 0.8 works 72 /* use a random scale factor to account for unknown descenders, 0.8 works
65 * reasonably well with bitstream vera 73 * reasonably well with bitstream vera
66 */ 74 */
67 PangoFontDescription *font = pango_context_get_font_description (context); 75 PangoFontDescription *font = self->font ? self->font : default_font;
68 76
69 int height = self->base_height * (PANGO_SCALE * 8 / 10);
70
71 if (pango_font_description_get_size (font) != height)
72 {
73 pango_font_description_set_absolute_size (font, height); 77 pango_font_description_set_absolute_size (font,
74 pango_layout_context_changed (self->pl); 78 MAX (MIN_FONT_HEIGHT, self->base_height) * (PANGO_SCALE * 8 / 10));
75 } 79
80 pango_layout_set_font_description (self->pl, font);
76} 81}
77 82
78static void 83static void
79layout_get_pixel_size (CFClient__Layout self, int *w, int *h) 84layout_get_pixel_size (CFClient__Layout self, int *w, int *h)
80{ 85{
81 layout_update (self);
82
83 pango_layout_get_pixel_size (self->pl, w, h); 86 pango_layout_get_pixel_size (self->pl, w, h);
84 87
85 *w = (*w + 3) & ~3; 88 *w = (*w + 3) & ~3;
86 if (!*w) *w = 1; 89 if (!*w) *w = 1;
87 if (!*h) *h = 1; 90 if (!*h) *h = 1;
237 break; 240 break;
238 241
239 row->col[x - row->c0].darkness = -1; 242 row->col[x - row->c0].darkness = -1;
240 } 243 }
241 } 244 }
245}
246
247static void
248music_finished ()
249{
250 SDL_UserEvent ev;
251
252 ev.type = SDL_USEREVENT;
253 ev.code = 0;
254 ev.data1 = 0;
255 ev.data2 = 0;
256
257 SDL_PushEvent ((SDL_Event *)&ev);
242} 258}
243 259
244MODULE = CFClient PACKAGE = CFClient 260MODULE = CFClient PACKAGE = CFClient
245 261
246PROTOTYPES: ENABLE 262PROTOTYPES: ENABLE
386 402
387 SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); 403 SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
388 SDL_GL_SetAttribute (SDL_GL_BUFFER_SIZE, 15); 404 SDL_GL_SetAttribute (SDL_GL_BUFFER_SIZE, 15);
389 SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 0); 405 SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 0);
390 406
407 SDL_EnableUNICODE (1);
408 SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
409
391 m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL); 410 m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL);
392 411
393 if (m && m != (SDL_Rect **)-1) 412 if (m && m != (SDL_Rect **)-1)
394 while (*m) 413 while (*m)
395 { 414 {
410 ); 429 );
411 SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+"); 430 SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+");
412 OUTPUT: 431 OUTPUT:
413 RETVAL 432 RETVAL
414 433
415int 434void
416Mix_VolumeMusic (int newvol = -1) 435SDL_GL_SwapBuffers ()
436
437void
438SDL_PollEvent ()
439 PPCODE:
440{
441 SDL_Event ev;
442
443 while (SDL_PollEvent (&ev))
444 {
445 HV *hv = newHV ();
446 hv_store (hv, "type", 4, newSViv (ev.type), 0);
447 switch (ev.type)
448 {
449 case SDL_KEYDOWN:
450 case SDL_KEYUP:
451 hv_store (hv, "state", 5, newSViv (ev.key.state), 0);
452 hv_store (hv, "sym", 3, newSViv (ev.key.keysym.sym), 0);
453 hv_store (hv, "mod", 3, newSViv (ev.key.keysym.mod), 0);
454 hv_store (hv, "unicode", 7, newSViv (ev.key.keysym.unicode), 0);
455 break;
456
457 case SDL_ACTIVEEVENT:
458 hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0);
459 hv_store (hv, "state", 5, newSViv (ev.active.state), 0);
460 break;
461
462 case SDL_MOUSEMOTION:
463 hv_store (hv, "state", 5, newSViv (ev.motion.state), 0);
464 hv_store (hv, "x", 1, newSViv (ev.motion.x), 0);
465 hv_store (hv, "y", 1, newSViv (ev.motion.y), 0);
466 hv_store (hv, "xrel", 4, newSViv (ev.motion.xrel), 0);
467 hv_store (hv, "yrel", 4, newSViv (ev.motion.yrel), 0);
468 break;
469
470 case SDL_MOUSEBUTTONDOWN:
471 case SDL_MOUSEBUTTONUP:
472 hv_store (hv, "button", 6, newSViv (ev.button.button), 0);
473 hv_store (hv, "state", 5, newSViv (ev.button.state), 0);
474 hv_store (hv, "x", 1, newSViv (ev.button.x), 0);
475 hv_store (hv, "y", 1, newSViv (ev.button.y), 0);
476 }
477
478 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
479 }
480}
417 481
418int 482int
419Mix_OpenAudio (int frequency = 22050, int format = MIX_DEFAULT_FORMAT, int channels = 1, int chunksize = 512) 483Mix_OpenAudio (int frequency = 22050, int format = MIX_DEFAULT_FORMAT, int channels = 1, int chunksize = 512)
484 POSTCALL:
485 Mix_HookMusicFinished (music_finished);
420 486
421void 487void
422Mix_CloseAudio () 488Mix_CloseAudio ()
423 489
424int 490int
447 513
448void 514void
449add_font (char *file) 515add_font (char *file)
450 CODE: 516 CODE:
451 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ 517 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */
452
453void
454set_font (char *file)
455 CODE:
456{
457 int count;
458 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count);
459 PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern, 0);
460 FcPatternDestroy (pattern);
461 pango_context_set_font_description (context, font);
462}
463 518
464void 519void
465load_image_inline (SV *image_) 520load_image_inline (SV *image_)
466 ALIAS: 521 ALIAS:
467 load_image_file = 1 522 load_image_file = 1
558#else 613#else
559 fprintf (stderr, "FATAL: %s\n", message); 614 fprintf (stderr, "FATAL: %s\n", message);
560#endif 615#endif
561 exit (1); 616 exit (1);
562 617
618MODULE = CFClient PACKAGE = CFClient::Font
619
620CFClient::Font
621new_from_file (SV *class, char *path)
622 CODE:
623{
624 int count;
625 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)path, 0, 0, &count);
626 RETVAL = pango_fc_font_description_from_pattern (pattern, 0);
627 FcPatternDestroy (pattern);
628}
629 OUTPUT:
630 RETVAL
631
632void
633DESTROY (CFClient::Font self)
634 CODE:
635 pango_font_description_free (self);
636
637void
638make_default (CFClient::Font self)
639 CODE:
640 default_font = self;
641
563MODULE = CFClient PACKAGE = CFClient::Layout 642MODULE = CFClient PACKAGE = CFClient::Layout
564 643
565CFClient::Layout 644CFClient::Layout
566new (SV *class, int base_height = 10) 645new (SV *class, int base_height = MIN_FONT_HEIGHT)
567 CODE: 646 CODE:
568 New (0, RETVAL, 1, struct cf_layout); 647 New (0, RETVAL, 1, struct cf_layout);
648 RETVAL->pl = pango_layout_new (context);
569 RETVAL->base_height = base_height; 649 RETVAL->base_height = base_height;
570 RETVAL->pl = pango_layout_new (context); 650 RETVAL->font = 0;
571 pango_layout_set_wrap (RETVAL->pl, PANGO_WRAP_WORD_CHAR); 651 pango_layout_set_wrap (RETVAL->pl, PANGO_WRAP_WORD_CHAR);
652 pango_layout_set_font_description (RETVAL->pl, default_font);
572 OUTPUT: 653 OUTPUT:
573 RETVAL 654 RETVAL
574 655
575void 656void
576DESTROY (CFClient::Layout self) 657DESTROY (CFClient::Layout self)
605 SvUTF8_on (RETVAL); 686 SvUTF8_on (RETVAL);
606 OUTPUT: 687 OUTPUT:
607 RETVAL 688 RETVAL
608 689
609void 690void
691set_font (CFClient::Layout self, CFClient::Font font = 0)
692 CODE:
693 if (self->font != font)
694 {
695 self->font = font;
696 layout_update_font (self);
697 }
698
699void
610set_height (CFClient::Layout self, int base_height) 700set_height (CFClient::Layout self, int base_height)
611 CODE: 701 CODE:
702 if (self->base_height != base_height)
703 {
612 self->base_height = base_height; 704 self->base_height = base_height;
705 layout_update_font (self);
706 }
613 707
614void 708void
615set_width (CFClient::Layout self, int max_width = -1) 709set_width (CFClient::Layout self, int max_width = -1)
616 CODE: 710 CODE:
617 pango_layout_set_width (self->pl, max_width < 0 ? max_width : max_width * PANGO_SCALE); 711 pango_layout_set_width (self->pl, max_width < 0 ? max_width : max_width * PANGO_SCALE);
620size (CFClient::Layout self) 714size (CFClient::Layout self)
621 PPCODE: 715 PPCODE:
622{ 716{
623 int w, h; 717 int w, h;
624 718
625 layout_update (self);
626 layout_get_pixel_size (self, &w, &h); 719 layout_get_pixel_size (self, &w, &h);
627 720
628 EXTEND (SP, 2); 721 EXTEND (SP, 2);
629 PUSHs (sv_2mortal (newSViv (w))); 722 PUSHs (sv_2mortal (newSViv (w)));
630 PUSHs (sv_2mortal (newSViv (h))); 723 PUSHs (sv_2mortal (newSViv (h)));
633int 726int
634xy_to_index (CFClient::Layout self, int x, int y) 727xy_to_index (CFClient::Layout self, int x, int y)
635 CODE: 728 CODE:
636{ 729{
637 int index, trailing; 730 int index, trailing;
638
639 layout_update (self);
640 pango_layout_xy_to_index (self->pl, x * PANGO_SCALE, y * PANGO_SCALE, &index, &trailing); 731 pango_layout_xy_to_index (self->pl, x * PANGO_SCALE, y * PANGO_SCALE, &index, &trailing);
641
642 RETVAL = index; 732 RETVAL = index;
643} 733}
644 OUTPUT: 734 OUTPUT:
645 RETVAL 735 RETVAL
646 736
647void 737void
648cursor_pos (CFClient::Layout self, int index) 738cursor_pos (CFClient::Layout self, int index)
649 PPCODE: 739 PPCODE:
650{ 740{
651 PangoRectangle strong_pos; 741 PangoRectangle strong_pos;
652 layout_update (self);
653 pango_layout_get_cursor_pos (self->pl, index, &strong_pos, 0); 742 pango_layout_get_cursor_pos (self->pl, index, &strong_pos, 0);
654 743
655 EXTEND (SP, 3); 744 EXTEND (SP, 3);
656 PUSHs (sv_2mortal (newSViv (strong_pos.x / PANGO_SCALE))); 745 PUSHs (sv_2mortal (newSViv (strong_pos.x / PANGO_SCALE)));
657 PUSHs (sv_2mortal (newSViv (strong_pos.y / PANGO_SCALE))); 746 PUSHs (sv_2mortal (newSViv (strong_pos.y / PANGO_SCALE)));
664{ 753{
665 SV *retval; 754 SV *retval;
666 int w, h; 755 int w, h;
667 FT_Bitmap bitmap; 756 FT_Bitmap bitmap;
668 757
669 layout_update (self);
670 layout_get_pixel_size (self, &w, &h); 758 layout_get_pixel_size (self, &w, &h);
671 759
672 retval = newSV (w * h); 760 retval = newSV (w * h);
673 SvPOK_only (retval); 761 SvPOK_only (retval);
674 SvCUR_set (retval, w * h); 762 SvCUR_set (retval, w * h);
885 cell->darkness = -1; 973 cell->darkness = -1;
886 } 974 }
887} 975}
888 976
889SV * 977SV *
890mapmap (CFClient::Map self, int w, int h) 978mapmap (CFClient::Map self, int x0, int y0, int w, int h)
891 CODE: 979 CODE:
892{ 980{
893 int x0, x1, x; 981 int x1, x;
894 int y0, y1, y; 982 int y1, y;
895 int z; 983 int z;
896 SV *map_sv = newSV (w * h * sizeof (uint32_t)); 984 SV *map_sv = newSV (w * h * sizeof (uint32_t));
897 uint32_t *map = (uint32_t *)SvPVX (map_sv); 985 uint32_t *map = (uint32_t *)SvPVX (map_sv);
898 986
899 SvPOK_only (map_sv); 987 SvPOK_only (map_sv);
900 SvCUR_set (map_sv, w * h * sizeof (uint32_t)); 988 SvCUR_set (map_sv, w * h * sizeof (uint32_t));
901 989
902 x0 = self->x - w / 2; x1 = x0 + w; 990 x0 += self->x; x1 = x0 + w;
903 y0 = self->y - h / 2; y1 = y0 + h; 991 y0 += self->y; y1 = y0 + h;
904 992
905 for (y = y0; y < y1; y++) 993 for (y = y0; y < y1; y++)
906 { 994 {
907 maprow *row = 0 <= y && y < self->rows 995 maprow *row = 0 <= y && y < self->rows
908 ? self->row + y 996 ? self->row + y
1048 *data++ = 0; /* version 0 format */ 1136 *data++ = 0; /* version 0 format */
1049 *data++ = w >> 8; *data++ = w; 1137 *data++ = w >> 8; *data++ = w;
1050 *data++ = h >> 8; *data++ = h; 1138 *data++ = h >> 8; *data++ = h;
1051 1139
1052 // we need to do this 'cause we don't keep an absolute coord system for rows 1140 // we need to do this 'cause we don't keep an absolute coord system for rows
1053 // TODO: treat rows as we treat 1141 // TODO: treat rows as we treat columns
1054 map_get_row (self, y0 + self->y - self->oy);//D 1142 map_get_row (self, y0 + self->y - self->oy);//D
1055 map_get_row (self, y0 + self->y - self->oy + h - 1);//D 1143 map_get_row (self, y0 + self->y - self->oy + h - 1);//D
1056 1144
1057 x0 += self->x - self->ox; 1145 x0 += self->x - self->ox;
1058 y0 += self->y - self->oy; 1146 y0 += self->y - self->oy;
1122 1210
1123 w = *data++ << 8; w |= *data++; 1211 w = *data++ << 8; w |= *data++;
1124 h = *data++ << 8; h |= *data++; 1212 h = *data++ << 8; h |= *data++;
1125 1213
1126 // we need to do this 'cause we don't keep an absolute coord system for rows 1214 // we need to do this 'cause we don't keep an absolute coord system for rows
1127 // TODO: treat rows as we treat 1215 // TODO: treat rows as we treat columns
1128 map_get_row (self, y0 + self->y - self->oy);//D 1216 map_get_row (self, y0 + self->y - self->oy);//D
1129 map_get_row (self, y0 + self->y - self->oy + h - 1);//D 1217 map_get_row (self, y0 + self->y - self->oy + h - 1);//D
1130 1218
1131 x0 += self->x - self->ox; 1219 x0 += self->x - self->ox;
1132 y0 += self->y - self->oy; 1220 y0 += self->y - self->oy;
1223 CODE: 1311 CODE:
1224 RETVAL = Mix_PlayMusic (self, loops); 1312 RETVAL = Mix_PlayMusic (self, loops);
1225 OUTPUT: 1313 OUTPUT:
1226 RETVAL 1314 RETVAL
1227 1315
1316MODULE = CFClient PACKAGE = CFClient::OpenGL
1317
1318BOOT:
1319{
1320 HV *stash = gv_stashpv ("CFClient::OpenGL", 1);
1321 static const struct {
1322 const char *name;
1323 IV iv;
1324 } *civ, const_iv[] = {
1325# define const_iv(name) { # name, (IV)name }
1326 const_iv (GL_COLOR_MATERIAL),
1327 const_iv (GL_SMOOTH),
1328 const_iv (GL_FLAT),
1329 const_iv (GL_BLEND),
1330 const_iv (GL_AND),
1331 const_iv (GL_SRC_ALPHA),
1332 const_iv (GL_ONE_MINUS_SRC_ALPHA),
1333 const_iv (GL_RGB),
1334 const_iv (GL_RGBA),
1335 const_iv (GL_UNSIGNED_BYTE),
1336 const_iv (GL_ALPHA4),
1337 const_iv (GL_ALPHA),
1338 const_iv (GL_FLOAT),
1339 const_iv (GL_UNSIGNED_INT_8_8_8_8_REV),
1340 const_iv (GL_COMPILE),
1341 const_iv (GL_TEXTURE_1D),
1342 const_iv (GL_TEXTURE_2D),
1343 const_iv (GL_TEXTURE_ENV),
1344 const_iv (GL_TEXTURE_MAG_FILTER),
1345 const_iv (GL_TEXTURE_MIN_FILTER),
1346 const_iv (GL_TEXTURE_ENV_MODE),
1347 const_iv (GL_TEXTURE_WRAP_S),
1348 const_iv (GL_TEXTURE_WRAP_T),
1349 const_iv (GL_CLAMP),
1350 const_iv (GL_REPEAT),
1351 const_iv (GL_NEAREST),
1352 const_iv (GL_LINEAR),
1353 const_iv (GL_NEAREST_MIPMAP_NEAREST),
1354 const_iv (GL_LINEAR_MIPMAP_NEAREST),
1355 const_iv (GL_NEAREST_MIPMAP_LINEAR),
1356 const_iv (GL_LINEAR_MIPMAP_LINEAR),
1357 const_iv (GL_GENERATE_MIPMAP),
1358 const_iv (GL_LINEAR),
1359 const_iv (GL_MODULATE),
1360 const_iv (GL_REPLACE),
1361 const_iv (GL_COLOR_BUFFER_BIT),
1362 const_iv (GL_PROJECTION),
1363 const_iv (GL_MODELVIEW),
1364 const_iv (GL_COLOR_LOGIC_OP),
1365 const_iv (GL_CONVOLUTION_2D),
1366 const_iv (GL_CONVOLUTION_BORDER_MODE),
1367 const_iv (GL_CONSTANT_BORDER),
1368 const_iv (GL_LINES),
1369 const_iv (GL_QUADS),
1370 const_iv (GL_LINE_LOOP),
1371 const_iv (GL_PERSPECTIVE_CORRECTION_HINT),
1372 const_iv (GL_FASTEST),
1373# undef const_iv
1374 };
1375
1376 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
1377 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
1378}
1379
1380int glGetError ()
1381
1382void glClear (int mask)
1383
1384void glClearColor (float r, float g, float b, float a = 1.0)
1385 PROTOTYPE: @
1386
1387void glEnable (int cap)
1388
1389void glDisable (int cap)
1390
1391void glShadeModel (int mode)
1392
1393void glHint (int target, int mode)
1394
1395void glBlendFunc (int sfactor, int dfactor)
1396
1397void glLogicOp (int opcode)
1398
1399void glMatrixMode (int mode)
1400
1401void glPushMatrix ()
1402
1403void glPopMatrix ()
1404
1405void glLoadIdentity ()
1406
1407void glOrtho (double left, double right, double bottom, double top, double near, double far)
1408
1409void glViewport (int x, int y, int width, int height)
1410
1411void glTranslate (float x, float y, float z = 0.)
1412 CODE:
1413 glTranslatef (x, y, z);
1414
1415void glScale (float x, float y, float z = 1.)
1416 CODE:
1417 glScalef (x, y, z);
1418
1419void glRotate (float angle, float x, float y, float z)
1420 CODE:
1421 glRotatef (angle, x, y, z);
1422
1423void glBegin (int mode)
1424
1425void glEnd ()
1426
1427void glColor (float r, float g, float b, float a = 1.0)
1428 PROTOTYPE: @
1429 CODE:
1430 glColor4f (r, g, b, a);
1431
1432void glVertex (float x, float y, float z = 0.)
1433 CODE:
1434 glVertex3f (x, y, z);
1435
1436void glTexCoord (float s, float t)
1437 CODE:
1438 glTexCoord2f (s, t);
1439
1440void glTexEnv (int target, int pname, float param)
1441 CODE:
1442 glTexEnvf (target, pname, param);
1443
1444void glTexParameter (int target, int pname, float param)
1445 CODE:
1446 glTexParameterf (target, pname, param);
1447
1448void glBindTexture (int target, int name)
1449
1450void glConvolutionParameter (int target, int pname, float params)
1451 CODE:
1452 glConvolutionParameterf (target, pname, params);
1453
1454void glConvolutionFilter2D (int target, int internalformat, int width, int height, int format, int type, char *data)
1455
1456void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type, char *data)
1457
1458void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border)
1459
1460int glGenTexture ()
1461 CODE:
1462{
1463 GLuint name;
1464 glGenTextures (1, &name);
1465 RETVAL = name;
1466}
1467 OUTPUT:
1468 RETVAL
1469
1470void glDeleteTexture (int name)
1471 CODE:
1472{
1473 GLuint name_ = name;
1474 glDeleteTextures (1, &name_);
1475}
1476
1477int glGenList ()
1478 CODE:
1479 RETVAL = glGenLists (1);
1480 OUTPUT:
1481 RETVAL
1482
1483void glDeleteList (int list)
1484 CODE:
1485 glDeleteLists (list, 1);
1486
1487void glNewList (int list, int mode = GL_COMPILE)
1488
1489void glEndList ()
1490
1491void glCallList (int list)
1492

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines