2007-05-28 Matthew Allum <mallum@openedhand.com>

* clutter/clutter-backend.c:
        * clutter/clutter-backend.h:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-backend-glx.c:
        Fix up rendering pipeline removing clutter_backend_XXX_stage_paint
        and adding clutter_backend_XXX_redraw instead. Duplicates less
        code in backends, avoids clutter_actor_paint() getting called
        before stage is set up (viewport wise) and unbreaks things like
        picking.

        * clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-main.c:
        * clutter/clutter-private.h:
        * clutter/clutter-stage.c: (clutter_stage_get_actor_at_pos):
        Redo picking functionality a different way (via color indexing)
        as to provide more flexibility, possibly speed and more likely
        work with GL/ES (doesn't currently however - not sure why).

        * clutter/clutter-group.c:
        Add groups own 'pick' method.

        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        Move clipping funtionality into cogl.

        * clutter/cogl/gles/cogl-defines.h:
        Hack around missing BGR format in GL/ES.

        * clutter/egl/clutter-backend-egl.c:
        * clutter/egl/clutter-backend-egl.h:
        * clutter/egl/clutter-stage-egl.c:
        * clutter/sdl/clutter-backend-sdl.c:
        * clutter/sdl/clutter-backend-sdl.h:
        * clutter/sdl/clutter-event-sdl.c:
        * clutter/sdl/clutter-stage-sdl.c:
        Update backends to newer API.
        Add basic mouse event translation to SDL.
This commit is contained in:
Matthew Allum
2007-05-28 18:49:34 +00:00
parent a64b6b7ee7
commit a2bd6de736
22 changed files with 498 additions and 374 deletions

View File

@ -113,6 +113,19 @@ clutter_backend_sdl_get_stage (ClutterBackend *backend)
return backend_sdl->stage;
}
static void
clutter_backend_sdl_redraw (ClutterBackend *backend)
{
ClutterBackendSDL *backend_sdl = CLUTTER_BACKEND_SDL (backend);
ClutterStageSDL *stage_sdl;
stage_sdl = CLUTTER_STAGE_SDL(backend_sdl->stage);
clutter_actor_paint (CLUTTER_ACTOR(stage_sdl));
SDL_GL_SwapBuffers();
}
static void
clutter_backend_sdl_finalize (GObject *gobject)
{
@ -181,6 +194,7 @@ clutter_backend_sdl_class_init (ClutterBackendSDLClass *klass)
backend_class->init_events = clutter_backend_sdl_init_events;
backend_class->get_stage = clutter_backend_sdl_get_stage;
backend_class->add_options = clutter_backend_sdl_add_options;
backend_class->redraw = clutter_backend_sdl_redraw;
}
static void