mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
2007-08-13 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c: * clutter/clutter-actor.h: * clutter/clutter-event.c: * clutter/clutter-event.h: * clutter/clutter-main.c: * clutter/clutter-main.h: * clutter/clutter-private.h: * clutter/clutter-stage.c: * clutter/clutter-stage.h: * clutter/clutter-types.h: Initial implementation of actors emmitting event signals (423); - Actors set_reactive() to receive mouse events. (call clutter_enable_motion_events() for per action motion events) - clutter_stage_set_key_focus () to direct key events. - Events bubble up to parents (ending at stage) (original source identified by clutter_event_get_source()) TODO: - enter/leave notifys for actors. - stage specific events - fullscreen - grabs * tests/test-events.c: Extend a little to use new API * clutter/cogl/gl/cogl.c: * clutter/glx/clutter-backend-glx.c: Move get_proc_address into cogl and out of backend. (shaders will need it) * clutter/clutter-group.c: (clutter_group_real_lower): Fix a minor compile warning. * TODO: Sync up.
This commit is contained in:
parent
a752579845
commit
fe4fb91fa3
45
gl/cogl.c
45
gl/cogl.c
@ -29,6 +29,13 @@
|
||||
#include <GL/gl.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_CLUTTER_GLX
|
||||
#include <dlfcn.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
typedef CoglFuncPtr (*GLXGetProcAddressProc) (const guint8 *procName);
|
||||
#endif
|
||||
|
||||
static gulong __enable_flags = 0;
|
||||
|
||||
#if COGL_DEBUG
|
||||
@ -81,7 +88,43 @@ error_string(GLenum errorCode)
|
||||
CoglFuncPtr
|
||||
cogl_get_proc_address (const gchar* name)
|
||||
{
|
||||
/* FIXME: This very likely needs to be handled in the backend */
|
||||
/* Sucks to ifdef here but not other option..? would be nice to
|
||||
* split the code up for more reuse (once more backends use this
|
||||
*/
|
||||
#ifdef HAVE_CLUTTER_GLX
|
||||
static GLXGetProcAddressProc get_proc_func = NULL;
|
||||
static void *dlhand = NULL;
|
||||
|
||||
if (get_proc_func == NULL && dlhand == NULL)
|
||||
{
|
||||
dlhand = dlopen (NULL, RTLD_LAZY);
|
||||
|
||||
if (dlhand)
|
||||
{
|
||||
dlerror ();
|
||||
|
||||
get_proc_func =
|
||||
(GLXGetProcAddressProc) dlsym (dlhand, "glXGetProcAddress");
|
||||
|
||||
if (dlerror () != NULL)
|
||||
{
|
||||
get_proc_func =
|
||||
(GLXGetProcAddressProc) dlsym (dlhand, "glXGetProcAddressARB");
|
||||
}
|
||||
|
||||
if (dlerror () != NULL)
|
||||
{
|
||||
get_proc_func = NULL;
|
||||
g_warning ("failed to bind GLXGetProcAddress "
|
||||
"or GLXGetProcAddressARB");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (get_proc_func)
|
||||
return get_proc_func ((unsigned char*) name);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user