|
|
|
|
@ -161,15 +161,6 @@ void gfx_draw_polygon (struct image *dimg, iPoint *p, int pcnt, struct line_styl
|
|
|
|
|
glVertex2i (p[i].x, p[i].y);
|
|
|
|
|
|
|
|
|
|
glEnd ();
|
|
|
|
|
|
|
|
|
|
if (style.width > 0.0) {
|
|
|
|
|
glBegin (GL_LINE_LOOP);
|
|
|
|
|
glLineWidth (style.width/2.0);
|
|
|
|
|
glColor4f (style.c.c.r, style.c.c.g, style.c.c.b, 1.0f);
|
|
|
|
|
for (i = 0; i < pcnt; i++)
|
|
|
|
|
glVertex2i (p[i].x, p[i].y);
|
|
|
|
|
glEnd ();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -179,6 +170,7 @@ 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) {
|
|
|
|
|
gfx_fbo_switch (dimg);
|
|
|
|
|
glColor4f (c->c.r, c->c.g, c->c.b, 1.0f);
|
|
|
|
|
d_printf ("fint_draw:'%s'", text);
|
|
|
|
|
font_draw (font, text, x, y+12.0, 1.0, 1.0);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -297,28 +289,6 @@ void gfx_img_free (struct image *img) {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
void gfx_draw_rect (struct image *dimg, int x1, int y1, int x2, int y2, struct color *c) {
|
|
|
|
|
d_printf ("rect...");
|
|
|
|
|
// int i;
|
|
|
|
|
//
|
|
|
|
|
// gfx_fbo_switch (dimg);
|
|
|
|
|
// glBegin (GL_POLYGON);
|
|
|
|
|
// glColor4f (c.c.r, c.c.g, c.c.b, 1.0f);
|
|
|
|
|
// for (i = 0; i < pcnt; i++)
|
|
|
|
|
// glVertex2i (p[i].x, p[i].y);
|
|
|
|
|
// glEnd ();
|
|
|
|
|
//
|
|
|
|
|
// glBegin (GL_LINES);
|
|
|
|
|
// glLineWidth (style.width/2.0);
|
|
|
|
|
// glColor4f (style.c.c.r, style.c.c.g, style.c.c.b, 1.0f);
|
|
|
|
|
// for (i = 0; i < pcnt; i++)
|
|
|
|
|
// glVertex2i (p[i].x, p[i].y);
|
|
|
|
|
// glEnd ();
|
|
|
|
|
};
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define HEADER_SIZE 8
|
|
|
|
|
int gfxpng_fd = 0;
|
|
|
|
|
void png_fd_read(png_structp png, png_bytep data, png_size_t size) {
|
|
|
|
|
|