diff --git a/android/jni/android_font.c b/android/jni/android_font.c index 0a6d209..6f2435b 100644 --- a/android/jni/android_font.c +++ b/android/jni/android_font.c @@ -121,8 +121,8 @@ void font_draw (struct font *f, char *text, float x, float y, float sx, float sy glVertexAttribPointer (engine.gles_txcoord, 2, GL_FLOAT, GL_FALSE, 0, vt); glDrawArrays(GL_TRIANGLE_FAN,0,4); - glVertexAttribPointer (engine.gles_pos, 3, GL_FLOAT, GL_FALSE, 0, vp); - glDrawArrays(GL_LINES,0,2); +// glVertexAttribPointer (engine.gles_pos, 3, GL_FLOAT, GL_FALSE, 0, vp); +// glDrawArrays(GL_LINES,0,2); /* Advance the cursor to the start of the next character */ diff --git a/sdlgl/sdl_font.c b/sdlgl/sdl_font.c index 2c8ebd5..1d67e52 100644 --- a/sdlgl/sdl_font.c +++ b/sdlgl/sdl_font.c @@ -104,7 +104,7 @@ void font_draw (struct font *f, char *text, float x, float y, float sx, float sy /* Upload the "bitmap", which contains an 8-bit grayscale image, as an alpha texture */ glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, g->bitmap.width, g->bitmap.rows, 0, GL_ALPHA, GL_UNSIGNED_BYTE, g->bitmap.buffer); /* Calculate the vertex and texture coordinates */ - // d_printf ("x: %f advance:%d %d", x, g->advance.x, g->advance.x >> 6); +// d_printf ("char:%c bitmap.rows:%d bitmap_top:%d", *p, g->bitmap.rows, g->bitmap_top); vp[0] = x; vp[1] = y + g->bitmap.rows - g->bitmap_top; vp[2] = x + g->bitmap.width; vp[3] = y + g->bitmap.rows - g->bitmap_top; @@ -116,10 +116,9 @@ void font_draw (struct font *f, char *text, float x, float y, float sx, float sy glDrawArrays(GL_TRIANGLE_FAN,0,4); // glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(2, GL_FLOAT, 0, vp); - glDrawArrays(GL_LINES,0,2); +// glVertexPointer(2, GL_FLOAT, 0, vp); +// glDrawArrays(GL_LINES,0,2); // glDisableClientState(GL_VERTEX_ARRAY); - /* Advance the cursor to the start of the next character */ // x += (g->advance.x >> 6); diff --git a/sdlgl/sdl_gfx.c b/sdlgl/sdl_gfx.c index c41d2a4..04b19fb 100644 --- a/sdlgl/sdl_gfx.c +++ b/sdlgl/sdl_gfx.c @@ -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) {