Changeset 1044
- Timestamp:
- Sep 17, 2006, 3:12:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/driver_gl.c
r1039 r1044 58 58 #endif 59 59 static void _display(void); 60 void gl_generate_glyph(uint32_t c, uint32_t tid, caca_display_t *dp);61 void gl_generate_unicode_glyph(uint32_t c, uint32_t tid, caca_display_t *dp);60 static void gl_generate_glyph(uint32_t, uint32_t, caca_display_t *); 61 static void gl_generate_unicode_glyph(uint32_t, uint32_t, caca_display_t *); 62 62 63 63 struct driver_private … … 536 536 } 537 537 538 539 /* 540 * Driver initialisation 541 */ 542 543 int gl_install(caca_display_t *dp) 544 { 545 #if defined(HAVE_GETENV) && defined(GLUT_XLIB_IMPLEMENTATION) 546 if(!getenv("DISPLAY") || !*(getenv("DISPLAY"))) 547 return -1; 548 #endif 549 550 dp->drv.driver = CACA_DRIVER_GL; 551 552 dp->drv.init_graphics = gl_init_graphics; 553 dp->drv.end_graphics = gl_end_graphics; 554 dp->drv.set_display_title = gl_set_display_title; 555 dp->drv.get_display_width = gl_get_display_width; 556 dp->drv.get_display_height = gl_get_display_height; 557 dp->drv.display = gl_display; 558 dp->drv.handle_resize = gl_handle_resize; 559 dp->drv.get_event = gl_get_event; 560 dp->drv.set_mouse = gl_set_mouse; 561 562 return 0; 563 } 564 565 566 567 void gl_generate_glyph(uint32_t c, uint32_t tid, caca_display_t *dp) { 538 static void gl_generate_glyph(uint32_t c, uint32_t tid, caca_display_t *dp) 539 { 568 540 int s,d; 569 541 uint8_t *glyph8 = calloc(dp->drv.p->font_width*dp->drv.p->font_height, 1); … … 573 545 574 546 /* Convert resulting 8bbp glyph to 32bits, 16x16*/ 575 for(s=0;s<(dp->drv.p->font_height<=16?dp->drv.p->font_height:16);s++) { 547 for(s=0;s<(dp->drv.p->font_height<=16?dp->drv.p->font_height:16);s++) 548 { 576 549 for(d=0;d<dp->drv.p->font_width;d++) 577 550 { … … 597 570 } 598 571 599 void gl_generate_unicode_glyph(uint32_t c, uint32_t tid, caca_display_t *dp) { 572 static void gl_generate_unicode_glyph(uint32_t c, uint32_t tid, 573 caca_display_t *dp) 574 { 600 575 int s,d; 601 576 uint8_t *glyph8 = calloc(dp->drv.p->font_width*dp->drv.p->font_height, 1); … … 605 580 606 581 /* Convert resulting 8bbp glyph to 32bits, 16x16*/ 607 for(s=0;s<(dp->drv.p->font_height<=16?dp->drv.p->font_height:16);s++) { 582 for(s=0;s<(dp->drv.p->font_height<=16?dp->drv.p->font_height:16);s++) 583 { 608 584 for(d=0;d<(dp->drv.p->font_width<=16?dp->drv.p->font_width:16);d++) 609 585 { … … 629 605 } 630 606 631 632 633 634 607 /* 608 * Driver initialisation 609 */ 610 611 int gl_install(caca_display_t *dp) 612 { 613 #if defined(HAVE_GETENV) && defined(GLUT_XLIB_IMPLEMENTATION) 614 if(!getenv("DISPLAY") || !*(getenv("DISPLAY"))) 615 return -1; 616 #endif 617 618 dp->drv.driver = CACA_DRIVER_GL; 619 620 dp->drv.init_graphics = gl_init_graphics; 621 dp->drv.end_graphics = gl_end_graphics; 622 dp->drv.set_display_title = gl_set_display_title; 623 dp->drv.get_display_width = gl_get_display_width; 624 dp->drv.get_display_height = gl_get_display_height; 625 dp->drv.display = gl_display; 626 dp->drv.handle_resize = gl_handle_resize; 627 dp->drv.get_event = gl_get_event; 628 dp->drv.set_mouse = gl_set_mouse; 629 630 return 0; 631 } 635 632 636 633 #endif /* USE_GL */
Note: See TracChangeset
for help on using the changeset viewer.