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
This commit is contained in:
Matthias Melcher 2006-08-25 10:33:30 +00:00
parent 78547a5267
commit 862506e6d9
2 changed files with 4 additions and 1 deletions

View File

@ -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 ) {

View File

@ -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