Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: XEventNext blocking ...

  1. #1
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    936

    XEventNext blocking ...

    According my code and the fellowing link
    http://tronche.com/gui/x/xlib/event-...NextEvent.html

    XEventNext is a blocking function and this is bad for a real time programme...

    My question is : How to get event without blocking the rendering loop under X Window with OpenGL ?

    Thqnks you !

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: XEventNext blocking ...

    Use one of the XCheck*Event, those are non-blocking.
    http://tronche.com/gui/x/xlib/event-...ndowEvent.html

  3. #3
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    936

    Re: XEventNext blocking ...

    Thanks, I will try that

  4. #4
    Junior Member Newbie
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    27

    Re: XEventNext blocking ...

    while(XPending(p_Display)){
    XNextEvent(p_Display, &event);
    ...
    }
    is most probably what you are after.

  5. #5
    Guest

    Re: XEventNext blocking ...

    Concur with the above solutions, however be aware you still get _soft_ realtime. _hard_ realtime and unix, specifically X are mutually exclusive.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •