Hello everyone, my name is Kevin, and I am just starting using OpenGL. I
have been able to modify a c++ console application, that responds to the
user pressing the "Escape" key. I would love it if the program would
terminate when the user presses this key. What command should I call to
tell the program to break out of the glutMainLoop function?
On Fri, Nov 9, 2012 at 4:03 AM, <
freeglut-developer-request@...> wrote:
> Send Freeglut-developer mailing list submissions to
> freeglut-developer@...
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/freeglut-developer
> or, via email, send a message with subject or body 'help' to
> freeglut-developer-request@...
>
> You can reach the person managing the list at
> freeglut-developer-owner@...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Freeglut-developer digest..."
>
>
> Today's Topics:
>
> 1. Re: [PATCH] Two crashes when closing window.
> (Diederick C. Niehorster)
> 2. Re: [PATCH] Two crashes when closing window. (John Tsiombikas)
> 3. Re: [PATCH] Two crashes when closing window. (Philipp Kutin)
> 4. [PATCH] X11: CTRL and SHIFT state not retrieved correctly in
> glutMouseFunc() callback. (Philipp Kutin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 9 Nov 2012 07:05:00 +0800
> From: "Diederick C. Niehorster" <dcnieho@...>
> Subject: Re: [Freeglut-developer] [PATCH] Two crashes when closing
> window.
> To: FreeGLUT developers list
> <freeglut-developer@...>
> Message-ID:
> <
> CABcAi1gFfSsU7URsaW4xmhDfEP7q3ApCjMBnbWznZAx6-7bAPA@...>
> Content-Type: text/plain; charset=UTF-8
>
> Dear Philipp,
>
> Thanks, I'll have a look of this soon! Nope the previous patch did not
> arrive.
>
> Best,
> Dee
>
> On Fri, Nov 9, 2012 at 6:19 AM, Philipp Kutin <philipp.kutin@...>
> wrote:
> > Hi,
> >
> > The first one happens when a window is closed via the [x] button on the
> > window itself and fgStruct.CurrentWindow is NULL.
> > The second one occurs when a menu is deleted whose ParentWindow is NULL.
> >
> > Both cases can be reproduced easily in the modified "One" program that is
> > contained in the patch.
> > (Sorry for the brevity, it's late. Feel free to ask more detailed
> > information.)
> >
> > Greetings,
> > Philipp
> >
> > P. S.
> > I sent another patch a couple of days ago when I wasn't subscribed to
> this
> > list. Did that one arrive?
> >
> >
> ------------------------------------------------------------------------------
> > Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics
> > Download AppDynamics Lite for free today:
> > http://p.sf.net/sfu/appdyn_d2d_nov
> > _______________________________________________
> > Freeglut-developer mailing list
> > Freeglut-developer@...
> > https://lists.sourceforge.net/lists/listinfo/freeglut-developer
> >
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 9 Nov 2012 03:14:07 +0200
> From: John Tsiombikas <nuclear@...>
> Subject: Re: [Freeglut-developer] [PATCH] Two crashes when closing
> window.
> To: freeglut-developer@...
> Message-ID: <20121109011407.GA13824@...>
> Content-Type: text/plain; charset=us-ascii
>
> On Thu, Nov 08, 2012 at 11:19:53PM +0100, Philipp Kutin wrote:
> > Hi,
> >
> > The first one happens
>
> The first what? Don't assume the subject line is always visible in every
> mail user agent. Include all relevant information in the body of your
> message.
>
> > when a window is closed via the [x] button on the
> > window itself and fgStruct.CurrentWindow is NULL.
> > The second one occurs when a menu is deleted whose ParentWindow is NULL.
>
> Platform?
>
> > Both cases can be reproduced easily in the modified "One" program that is
> > contained in the patch.
> > (Sorry for the brevity, it's late. Feel free to ask more detailed
> > information.)
>
> I applied the last part of your patch which modifies one.c and I can't
> reproduce the crash by closing the window through the window manager.
> Any more details?
>
> --
> John Tsiombikas
> http://nuclear.mutantstargoat.com/
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 9 Nov 2012 12:52:26 +0100
> From: Philipp Kutin <philipp.kutin@...>
> Subject: Re: [Freeglut-developer] [PATCH] Two crashes when closing
> window.
> To: FreeGLUT developers list
> <freeglut-developer@...>
> Message-ID:
> <CABk5xxRnD4j9YO2jm5o+2D8-g8=m0nqHW4YW4fq=
> FGVyNRdWHA@...>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi and apologies for the lacking bug report... here goes some detail.
>
> On Fri, Nov 9, 2012 at 2:14 AM, John Tsiombikas <nuclear@...>
> wrote:
> >
> > The first what? Don't assume the subject line is always visible in every
> > mail user agent. Include all relevant information in the body of your
> > message.
> >
> Both are segfaults, produced because of a NULL pointer dereference.
>
> >
> > Platform?
> >
> uname -a gives:
> Linux pk-desktop 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26
> 21:54:23 UTC 2012 i686 i686 i386 GNU/Linux
> (It's Kubuntu 12.04 x86 on a Core2 Duo)
>
> > I applied the last part of your patch which modifies one.c and I can't
> > reproduce the crash by closing the window through the window manager.
> > Any more details?
> The first part of the patch is important too though, because removing
> the always-running redisplay events will help the first bug come to
> the surface. Attached is a cleaner patch (and slightly different, as
> far as the correction goes).
>
> Here's what happens and how to reproduce the two former crashes with
> the patched One.c. All changes are relevant.
>
> For the first crash, start "One" and close the window reading "Hello
> World!", making only the "I am not Jan B." remain, the one with the
> subwindows. It helps if no callbacks are run in this second window
> from the point on where the first one was closed. (Realistically,
> maybe the window would be at least redisplayed on mouse-overs in
> event-based apps, but it still could happen that the user went to the
> [x] button first.) Now, close this remaining window: The code reading
> "fgPlatformProcessSingleEvent: fgStructure.CurrentWindow==NULL before
> fgIsSpaceballXEvent" in the patched src/x11/fg_main_x11.c is then
> executed, that field being dereferenced unconditionally in the
> fgIsSpaceballXEvent(&event) check otherwise.
>
> For the second crash, open up "One" again, and in the window with the
> two subwindows, create one menu in each of them by left-clicking. They
> should now both be visible. Press the [x] button to close the window,
> and "fgDeactivateMenu: menu->ParentWindow==NULL", from the patched
> src/fg_menu.c appears.
>
> Hope this helps,
> Philipp
>
>
> P. S.
> One more thing: what's the correct way to do a debug build? My
> "make_debug.sh" reads
>
> cmake -D CMAKE_BUILD_TYPE=Debug .
> make -j 2
>
> but that won't compile the code guarded by #if _DEBUG.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: freeglut_winclose_and_menu_crashes_fixes_2.diff
> Type: application/octet-stream
> Size: 3429 bytes
> Desc: not available
>
> ------------------------------
>
> Message: 4
> Date: Fri, 9 Nov 2012 13:03:20 +0100
> From: Philipp Kutin <philipp.kutin@...>
> Subject: [Freeglut-developer] [PATCH] X11: CTRL and SHIFT state not
> retrieved correctly in glutMouseFunc() callback.
> To: FreeGLUT developers list
> <freeglut-developer@...>
> Message-ID:
> <
> CABk5xxStvb8WLMYtChHsJbM0VRJiMGGoas6dw8-b35ZNe9L2_A@...>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> trying to get the CTRL and SHIFT modifiers from glutMouseFunc()
> returns 0 even if they are pressed. (ALT is intercepted by my
> windowing system, is seems.)
>
> The actual fix is marked with "FIX" in the diff -- the first part of
> the fourth hunk for src/x11/fg_xinput_x11.c. The rest is code I
> inserted in the course of my debugging session and may be helpful to
> understand what's going on.
>
> Greetings,
> Philipp (helixhorned at Sourceforge)
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: freeglut_mouse_mod_bug_fix.diff
> Type: application/octet-stream
> Size: 8855 bytes
> Desc: not available
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
>
> ------------------------------
>
> _______________________________________________
> Freeglut-developer mailing list
> Freeglut-developer@...
> https://lists.sourceforge.net/lists/listinfo/freeglut-developer
>
>
> End of Freeglut-developer Digest, Vol 66, Issue 2
> *************************************************
>
|