[cells-devel] glutSwapBuffers bug?

Kenneth Tilton ktilton at nyc.rr.com
Sat Nov 13 17:35:57 UTC 2004


I just discovered that calling glutSwapBuffers at the end of my display 
callback is not enough to get my drawing commands out; I had to add a 
glFlush call.

But, from 
http://www.opengl.org/resources/libraries/glut/spec3/node21.html

"An implicit    glFlush is done by  glutSwapBuffers before it returns. 
Subsequent OpenGL commands can be issued immediately after calling  
glutSwapBuffers, but are not executed until the buffer exchange is 
completed."

And earlier at the same link:

"The update typically takes place during the vertical retrace of the 
monitor, rather than immediately after  glutSwapBuffers is called."

Interestingly, the original glut source does not show a call to 
glFlush. Freeglut calls glFlush before swapping, while Apple's Cocoa 
Glut calls it after.

Possibly calling after the swap is cool as long as the actual swap is 
deferred a hair, in which case the glFlush is still operating on the 
pre-swap buffer. But in my case (specs below), it seems the swap takes 
immediate effect and the glFlush comes too late.

Bottom line: should Apple's glutSwapBuffers call glFlush before doing 
the actual swap call?

kenny


set up:

   Machine Model:	Power Mac G5
   CPU Type:	PowerPC G5  (3.0)
   Number Of CPUs:	2
   CPU Speed:	2 GHz
   L2 Cache (per CPU):	512 KB
   Memory:	1 GB
   Bus Speed:	1 GHz
   Boot ROM Version:	5.1.8f5


System Version:	Mac OS X 10.3.5 (7P134)
   Kernel Version:	Darwin 7.5.1

ATY,R360:

   Type:	display
   Bus:	AGP
   Slot:	SLOT-1
   VRAM (Total):	256 MB
   Vendor:	ATI (0x1002)
   Device ID:	0x4e48
   Revision ID:	0x0000
   ROM Revision:	113-A14404-118

Display:

   Type:	display
   Display Type:	LCD
   VRAM (In Use):	256 MB
   Resolution:	1680 x 1050
   Depth:	32-bit Color
   Main Display:	Yes
   Mirror:	Off
   Online:	Yes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3031 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20041113/e8b7dd2b/attachment.bin>


More information about the cells-devel mailing list