From c0d927559cd3fa30ac8006de5b5d3325b2efceee Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 16 Jun 2006 07:01:28 +0000 Subject: [PATCH] enhanced logging --- lib/devices/opengl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/devices/opengl.c b/lib/devices/opengl.c index 955b60e..b897120 100644 --- a/lib/devices/opengl.c +++ b/lib/devices/opengl.c @@ -29,8 +29,7 @@ typedef struct _internal { GLUtesselator *tesselator_tex; } internal_t; -int verbose = 1; - +static int verbose = 1; static void dbg(char*format, ...) { char buf[1024]; @@ -122,6 +121,7 @@ void opengl_endclip(struct _gfxdevice*dev) void opengl_stroke(struct _gfxdevice*dev, gfxline_t*line, gfxcoord_t width, gfxcolor_t*color, gfx_capType cap_style, gfx_joinType joint_style, gfxcoord_t miterLimit) { + dbg("stroke"); internal_t*i = (internal_t*)dev->internal; char running = 0; gfxline_t*l=0; @@ -153,6 +153,7 @@ void opengl_stroke(struct _gfxdevice*dev, gfxline_t*line, gfxcoord_t width, gfxc void opengl_fill(struct _gfxdevice*dev, gfxline_t*line, gfxcolor_t*color) { + dbg("fill"); internal_t*i = (internal_t*)dev->internal; char running = 0; int len = 0; @@ -202,6 +203,7 @@ void opengl_fill(struct _gfxdevice*dev, gfxline_t*line, gfxcolor_t*color) void opengl_fillbitmap(struct _gfxdevice*dev, gfxline_t*line, gfximage_t*img, gfxmatrix_t*matrix, gfxcxform_t*cxform) { + dbg("fillbitmap"); internal_t*i = (internal_t*)dev->internal; char running = 0; int len = 0; @@ -252,6 +254,7 @@ void opengl_fillbitmap(struct _gfxdevice*dev, gfxline_t*line, gfximage_t*img, gf glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + gluTessBeginPolygon(i->tesselator_tex, NULL); l = line; len = 0; @@ -286,6 +289,7 @@ void opengl_fillbitmap(struct _gfxdevice*dev, gfxline_t*line, gfximage_t*img, gf l=l->next; } + if(running) { running = 0; gluTessEndContour(i->tesselator_tex); -- 1.7.10.4