diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-08-25 10:33:30 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-08-25 10:33:30 +0000 |
| commit | 862506e6d99735973c8847455a201a7746aa8e8f (patch) | |
| tree | e2370e3819aea20bfe71e16a4e13487678fae14c | |
| parent | 78547a5267a8f6401ef567278b212f5a872bc464 (diff) | |
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
| -rw-r--r-- | src/glut_compatability.cxx | 2 | ||||
| -rw-r--r-- | src/glut_font.cxx | 3 |
2 files changed, 4 insertions, 1 deletions
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 |
