Ignore:
Timestamp:
Mar 27, 2006, 12:57:12 AM (14 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Added (untested) glut3 glutCheckLoop(), ans a regular display function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_gl.c

    r689 r694  
    2525#include <GL/glut.h>
    2626#include <GL/freeglut_ext.h>
     27
     28#ifdef USE_GLUTCHECKLOOP
     29#define glutMainLoopEvent glutCheckLoop
     30#endif
    2731
    2832#include <string.h>
     
    7478static void gl_handle_mouse(int, int, int, int);
    7579static void gl_handle_mouse_motion(int, int);
     80static void _display(void);
    7681
    7782struct driver_private
     
    147152    glutSpecialFunc(gl_handle_special_key);
    148153    glutReshapeFunc(gl_handle_reshape);
     154    glutDisplayFunc(_display);
     155
    149156
    150157    glutMouseFunc(gl_handle_mouse);
     
    223230    return kk->drv.p->height;
    224231}
     232
    225233
    226234static void gl_display(caca_t *kk)
     
    453461}
    454462
     463
     464
     465static void _display(void)
     466{
     467    caca_t *kk = gl_kk;
     468    gl_display(kk);
     469}
     470
     471
    455472/*
    456473 * Driver initialisation
Note: See TracChangeset for help on using the changeset viewer.