|
|
|
@ -39,7 +39,7 @@
|
|
|
|
iPoint gfx_screensize = {0, 0};
|
|
|
|
iPoint gfx_screensize = {0, 0};
|
|
|
|
int gfx_last_alloc_img = 0;
|
|
|
|
int gfx_last_alloc_img = 0;
|
|
|
|
int gfx_last_img_fbo = 0;
|
|
|
|
int gfx_last_img_fbo = 0;
|
|
|
|
|
|
|
|
struct font *font = NULL;
|
|
|
|
void gfx_fbo_switch (struct image *img);
|
|
|
|
void gfx_fbo_switch (struct image *img);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
@ -64,6 +64,7 @@ void gfx_init (int width, int height) {
|
|
|
|
gfx_screensize.x = width;
|
|
|
|
gfx_screensize.x = width;
|
|
|
|
gfx_screensize.y = height;
|
|
|
|
gfx_screensize.y = height;
|
|
|
|
gfx_resize (width, height);
|
|
|
|
gfx_resize (width, height);
|
|
|
|
|
|
|
|
font = font_load ("FreeSans.ttf");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -175,6 +176,8 @@ void gfx_draw_polygon (struct image *dimg, iPoint *p, int pcnt, struct line_styl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void gfx_draw_text (struct image *dimg, int x, int y, char *text, struct color *c) {
|
|
|
|
void gfx_draw_text (struct image *dimg, int x, int y, char *text, struct color *c) {
|
|
|
|
gfx_fbo_switch (dimg);
|
|
|
|
gfx_fbo_switch (dimg);
|
|
|
|
|
|
|
|
glColor4f (c->c.r, c->c.g, c->c.b, 1.0f);
|
|
|
|
|
|
|
|
font_draw (font, text, x, y+12.0, 1.0, 1.0);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|