From: Diederick C. N. <dc...@gm...> - 2014-01-22 10:09:50
|
Hi All, I just noted that in fgState we have the unused variable XSyncSwitch. This is set to true when the freeglut app is called with -sync command line option. Implementing it would be straightforward, what glut does is call XSynchronize(__glutDisplay, True); directly after __glutDisplay = XOpenDisplay(display); Should we add this, for compatibility's sake? Thanks, Dee |
From: John T. <nu...@me...> - 2014-01-22 21:13:57
|
On Wed, Jan 22, 2014 at 06:09:42PM +0800, Diederick C. Niehorster wrote: > Hi All, > > I just noted that in fgState we have the unused variable XSyncSwitch. > This is set to true when the freeglut app is called with -sync command > line option. > > Implementing it would be straightforward, what glut does is call > XSynchronize(__glutDisplay, True); directly after __glutDisplay = > XOpenDisplay(display); > > Should we add this, for compatibility's sake? Sure, I don't see why not. It just makes all X calls block for a response from the X server before returning, which makes debugging X11 code much easier (the program aborts exactly at the problematic X call instead of some random point later on, so you can actually see with a debugger what went wrong without trying to figure it out by X request sequence numbers). -- John Tsiombikas http://nuclear.mutantstargoat.com/ |
From: Diederick C. N. <dc...@gm...> - 2014-01-23 02:28:30
|
Hi John, Thanks, I've put it in, r 1643. Please do check if I did so correctly ;) Thanks, Dee On Thu, Jan 23, 2014 at 5:13 AM, John Tsiombikas <nu...@me...> wrote: > On Wed, Jan 22, 2014 at 06:09:42PM +0800, Diederick C. Niehorster wrote: >> Hi All, >> >> I just noted that in fgState we have the unused variable XSyncSwitch. >> This is set to true when the freeglut app is called with -sync command >> line option. >> >> Implementing it would be straightforward, what glut does is call >> XSynchronize(__glutDisplay, True); directly after __glutDisplay = >> XOpenDisplay(display); >> >> Should we add this, for compatibility's sake? > > Sure, I don't see why not. It just makes all X calls block for a > response from the X server before returning, which makes debugging X11 > code much easier (the program aborts exactly at the problematic X call > instead of some random point later on, so you can actually see with a > debugger what went wrong without trying to figure it out by X request > sequence numbers). > > -- > John Tsiombikas > http://nuclear.mutantstargoat.com/ > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Freeglut-developer mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/freeglut-developer |
From: John T. <nu...@me...> - 2014-01-23 12:35:58
|
On Thu, Jan 23, 2014 at 10:28:23AM +0800, Diederick C. Niehorster wrote: > Hi John, > > Thanks, I've put it in, r 1643. Please do check if I did so correctly ;) Checked it, It's fine :) -- John Tsiombikas http://nuclear.mutantstargoat.com/ |