From: Jeroen v. d. Z. <je...@fo...> - 2008-04-28 21:00:21
|
On Sunday 27 April 2008, The Devils Jester wrote: > Because I dont draw the entire scene just the small portion that has > changed, and to do this I rely on the buffer copying when I flip, not > switching, and there are apparently some drivers (In Vista mostly) > that do not support the copying method. > > The only solution that I have found is to use a Single buffer, which > works for my purposes perfectly except for this issue. > > Why would you need to call glFlush() before glFinish(), when they do > the same thing, except glFinish() wont return until everything is > passed? > > These commands only help to force the OpenGL commands 'right now', > however that is not the issue, as I can wait for a half hour and the > FXGLCanvas still doesnt update. Still I remember trying both together > anyway, just to see, and it didnt help at all. > > It works fine in Windows, so I am assuming its related to how OpenGL > in Linux runs faster, but jerky, and Slower but Smooth in Windows. > > It usually only happens when I have a small section to draw. The > bigger section, the less likely it is to happen. Its like OpenGL is > still waiting on more, even after glFlush() and glFinish(). glFlush() and glFinish() do NOT do the same thing. glFlush() pushes the commands from the client to the server, and then returns. The commands thus pushed will eventually be executed, but at the time glFlush() returns they may not have been executed yet in the server. To ensure the commands are actually executed, you use glFinish(). glFinish() implies glFlush(), except that glFinish() supposedly returns only until after these commands are actually executed by the server. Thus, glFlush() is faster than glFinish(), but glFinish() is needed if you actually want to perform no other work until the picture is actually on the screen. - Jeroen |