From 862506e6d99735973c8847455a201a7746aa8e8f Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 25 Aug 2006 10:33:30 +0000 Subject: Two simple glut fixes (flickering and VC6 compiler issues). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/glut_compatability.cxx | 2 ++ src/glut_font.cxx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx index 85ea3cb6d..373beb438 100644 --- a/src/glut_compatability.cxx +++ b/src/glut_compatability.cxx @@ -63,6 +63,8 @@ void Fl_Glut_Window::draw() { indraw = 1; if (!reshaped[number] ) { // ignore the first show event on glutCreateWindow + // avoid flickering: + glClear(GL_COLOR_BUFFER_BIT); reshaped[number] = 1; } else { if( !valid() || reshaped[number] == 1 ) { diff --git a/src/glut_font.cxx b/src/glut_font.cxx index 071767cdd..05c048e7c 100644 --- a/src/glut_font.cxx +++ b/src/glut_font.cxx @@ -55,7 +55,8 @@ int glutBitmapWidth(void* font, int character) { int glutBitmapLength(void *font, const unsigned char *string) { gl_font(((Glut_Bitmap_Font *)font)->font,((Glut_Bitmap_Font *)font)->size); - return int(gl_width((const char*)string)+.5); + const char *s = (const char*)string; + return int(gl_width(s)+.5); } #endif -- cgit v1.2.3