Changeset 694


Ignore:
Timestamp:
Mar 27, 2006, 12:57:12 AM (15 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Added (untested) glut3 glutCheckLoop(), ans a regular display function
Location:
libcaca/trunk
Files:
2 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
  • libcaca/trunk/configure.ac

    r657 r694  
    152152       [ac_cv_my_have_gl="yes"
    153153        AC_DEFINE(USE_GL, 1, Define to 1 to activate the OpenGL backend driver)
     154        CACA_LIBS="${CACA_LIBS} -lGL -lglut"
     155        CACA_DRIVERS="${CACA_DRIVERS} gl"])]
     156     [AC_CHECK_LIB(glut, glutCheckLoop,
     157       [ac_cv_my_have_gl="yes"
     158        AC_DEFINE(USE_GLUTCHECKLOOP, 1, Define to 1 to activate the glut3 glutCheckLoop call)
    154159        CACA_LIBS="${CACA_LIBS} -lGL -lglut"
    155160        CACA_DRIVERS="${CACA_DRIVERS} gl"])])])
Note: See TracChangeset for help on using the changeset viewer.