|
|
|
@ -239,7 +239,7 @@ void gfx_draw_line (struct image *dimg, int x1, int y1, int x2, int y2, struct l
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* draw polygon
|
|
|
|
* draw polygon
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void gfx_draw_polygon (struct image *dimg, iPoint *p, int pcnt, struct line_style style, struct color c) {
|
|
|
|
void gfx_draw_polygon (struct image *dimg, iPoint *p, int pcnt, struct line_style style, struct color *c) {
|
|
|
|
static GLfloat *polygon = NULL;
|
|
|
|
static GLfloat *polygon = NULL;
|
|
|
|
static int polygon_cnt = 0;
|
|
|
|
static int polygon_cnt = 0;
|
|
|
|
int i;
|
|
|
|
int i;
|
|
|
|
@ -262,7 +262,7 @@ void gfx_draw_polygon (struct image *dimg, iPoint *p, int pcnt, struct line_styl
|
|
|
|
|
|
|
|
|
|
|
|
glUseProgram (engine.gles_prgobject);
|
|
|
|
glUseProgram (engine.gles_prgobject);
|
|
|
|
glUniform1i (engine.gles_txenabled, 0);
|
|
|
|
glUniform1i (engine.gles_txenabled, 0);
|
|
|
|
glUniform4fv(engine.gles_color, 1, c.c.array);
|
|
|
|
glUniform4fv(engine.gles_color, 1, c->c.array);
|
|
|
|
glVertexAttribPointer (engine.gles_pos, 3, GL_FLOAT, GL_FALSE, 0, polygon);
|
|
|
|
glVertexAttribPointer (engine.gles_pos, 3, GL_FLOAT, GL_FALSE, 0, polygon);
|
|
|
|
glDrawArrays (GL_TRIANGLE_FAN, 0, pcnt);
|
|
|
|
glDrawArrays (GL_TRIANGLE_FAN, 0, pcnt);
|
|
|
|
|
|
|
|
|
|
|
|
|