- Timestamp:
- Sep 19, 2006, 10:18:32 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/driver_gl.c
r1063 r1064 496 496 int i, b, w, h, x, y; 497 497 498 /* Count how many glyphs this font has */ 498 499 dp->drv.p->blocks = cucul_get_font_blocks(dp->drv.p->f); 499 500 … … 501 502 b += dp->drv.p->blocks[i + 1] - dp->drv.p->blocks[i]; 502 503 503 dp->drv.p->txid = malloc(b * sizeof(int));504 /* Allocate a libcucul canvas and print all the glyphs on it */ 504 505 cv = cucul_create_canvas(1, b); 505 506 cucul_set_color(cv, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLACK); … … 515 516 } 516 517 518 /* Draw the cucul canvas onto an image buffer */ 517 519 image = malloc(b * dp->drv.p->font_height 518 520 * dp->drv.p->font_width * sizeof(uint32_t)); … … 520 522 b * dp->drv.p->font_height, 4 * dp->drv.p->font_width); 521 523 cucul_free_canvas(cv); 524 525 /* Convert all glyphs in the image buffer to GL textures */ 526 dp->drv.p->txid = malloc(b * sizeof(int)); 522 527 523 528 w = dp->drv.p->font_width <= 16 ? dp->drv.p->font_width : 16;
Note: See TracChangeset
for help on using the changeset viewer.