Changeset 4096 for libcaca/trunk


Ignore:
Timestamp:
Dec 7, 2009, 2:30:19 AM (10 years ago)
Author:
Sam Hocevar
Message:

Don't enter glutCheckLoop() from gl_get_event() if there is already an
event available. This increases the framerate when using OpenGL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver/gl.c

    r3582 r4096  
    4949 * Local functions
    5050 */
     51static int gl_get_event_inner(caca_display_t *, caca_privevent_t *);
    5152static void gl_handle_keyboard(unsigned char, int, int);
    5253static void gl_handle_special_key(int, int, int);
     
    334335static int gl_get_event(caca_display_t *dp, caca_privevent_t *ev)
    335336{
     337    int ret = gl_get_event_inner(dp, ev);
     338
     339    if (ret)
     340        return ret;
     341
    336342#ifdef HAVE_GLUTCHECKLOOP
    337343    glutCheckLoop();
     
    340346#endif
    341347
     348    return gl_get_event_inner(dp, ev);
     349}
     350
     351static int gl_get_event_inner(caca_display_t *dp, caca_privevent_t *ev)
     352{
    342353#ifdef HAVE_GLUTCLOSEFUNC
    343354    if(dp->drv.p->close)
Note: See TracChangeset for help on using the changeset viewer.