From: Fay J. F C. AAC/W. <joh...@eg...> - 2002-12-06 00:03:33
|
I did a search on where the Windows "SwapBuffers" function is called and there is only the one location in "glutSwapBuffers" right below the "glXSwapBuffers" call. (It's conditionally-compiled code and only one call is made.) I print out the window number and each window gets its buffer swapped once. The version that does not work, with the rotating guy, then gets the Window 1 (the guy window) buffers swapped on a continuing basis, but there are no other immediate swap events for Window 2 (where the problem is). I checked the rest of my printout, and Window 2 swaps buffers only immediately after the display list calls. (This stands to reason because the display lists are invoked in "CurveDisplay" which concludes with a call to "glutSwapBuffers". I've looked at the "freeglut" code to see if the extra call to "glutPostWindowRedisplay" does anything. It calls "fgWindowByID" to get the handle of the given window and it sets that window's flag to true. This is very innocuous. John F. Fay joh...@eg... -----Original Message----- From: Steve Baker [mailto:sjb...@ai...] Sent: Thursday, December 05, 2002 5:19 PM To: fre...@li... Subject: Re: [Freeglut-developer] Display lists in freeglut Fay John F Contr AAC/WMG wrote: > - Window 2 gets a call to "glutSwapBuffers". > - "fgWindowProc" gets a WM_PAINT" message for window 1. > - Window 1's "State.Redisplay" flag is set to false in > "fghcbDisplayWindowByHandle". It was already false from two messages > earlier. > > - Window 1 gets a call to "glutSwapBuffers". > > After this, the run with the non-moving guy goes back to messages > related to the mouse motion while the run with the moving guy gets a > combination of messages related to the mouse motion and messages > requesting a redraw of window 1. > > So in both cases the redraw function is called, and in both cases the > buffers are being swapped. So the error must be in glutSwapBuffer. Is it maybe only swapping one window - or the wrong window? Could it perhaps be swapping Window-2 *twice*? That has a similar effect to not swapping it at all...although in OpenGL, it's formally undefined what happens if you swap a window twice without rendering to it in between. Stick some debug in where the GLX swap buffers call is being made? How many times does the buffer swap for each call to the rendering code and for which window(s) ? ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freeglut-developer mailing list Fre...@li... https://lists.sourceforge.net/lists/listinfo/freeglut-developer |