Ticket #3191: glut3191.diff
File glut3191.diff, 1.5 KB (added by , 16 years ago) |
---|
-
src/kits/opengl/glut/glutWindow.cpp
364 364 void 365 365 glutSwapBuffers() 366 366 { 367 // don't swap anything in single buffer mode 368 if(gState.displayMode & GLUT_DOUBLE) 367 369 gState.currentWindow->SwapBuffers(); 368 370 } 369 371 -
src/kits/opengl/glut/glutEvent.cpp
340 340 gState.currentWindow->UnlockGL(); 341 341 } 342 342 343 // this stores the original display funcion 344 static GLUTdisplayCB __displayFunc; 345 346 // new display function with swap buffers automagically appended 347 void __singleBufferDisplay(void) 348 { 349 __displayFunc(); 350 gState.currentWindow->SwapBuffers(); 351 } 352 353 // switchs the display function 354 void __emulateSingleBuffer(void) 355 { 356 __displayFunc = gState.currentWindow->display; 357 gState.currentWindow->display = __singleBufferDisplay; 358 } 359 343 360 /*********************************************************** 344 361 * FUNCTION: glutMainLoop (3.1) 345 362 * … … 350 367 if (!gState.windowListSize) 351 368 __glutFatalUsage("main loop entered with no windows created."); 352 369 370 // Emulate single buffer for Haiku software renderer 371 if(!(gState.displayMode & GLUT_DOUBLE)) 372 __emulateSingleBuffer(); 373 353 374 if(gState.currentWindow) 354 375 gState.currentWindow->UnlockGL(); 355 376