2007-03-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_allocate_coords): Make sure the top-left corner of the box is our origin.
This commit is contained in:
parent
810661f612
commit
064d45266a
@ -1,3 +1,9 @@
|
|||||||
|
2007-03-23 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/glx/clutter-stage-glx.c:
|
||||||
|
(clutter_stage_glx_allocate_coords): Make sure the top-left
|
||||||
|
corner of the box is our origin.
|
||||||
|
|
||||||
2007-03-23 Matthew Allum <mallum@openedhand.com>
|
2007-03-23 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
* clutter/glx/clutter-stage-glx.c:
|
* clutter/glx/clutter-stage-glx.c:
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "clutter-group.h"
|
#include "clutter-group.h"
|
||||||
#include "clutter-main.h"
|
#include "clutter-main.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
#include "clutter-debug.h"
|
||||||
#include "clutter-marshal.h"
|
#include "clutter-marshal.h"
|
||||||
#include "clutter-enum-types.h"
|
#include "clutter-enum-types.h"
|
||||||
|
|
||||||
@ -68,6 +69,8 @@ clutter_group_paint (ClutterActor *actor)
|
|||||||
ClutterGroup *self = CLUTTER_GROUP(actor);
|
ClutterGroup *self = CLUTTER_GROUP(actor);
|
||||||
GList *child_item;
|
GList *child_item;
|
||||||
|
|
||||||
|
CLUTTER_NOTE (PAINT, "ClutterGroup paint enter");
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
for (child_item = self->priv->children;
|
for (child_item = self->priv->children;
|
||||||
@ -83,6 +86,8 @@ clutter_group_paint (ClutterActor *actor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -100,6 +100,16 @@ clutter_stage_delete_event (ClutterStage *stage,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_stage_paint (ClutterActor *actor)
|
||||||
|
{
|
||||||
|
/* chain up */
|
||||||
|
CLUTTER_NOTE (PAINT, "Chaining up to parent class paint");
|
||||||
|
|
||||||
|
if (CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->paint)
|
||||||
|
CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->paint (actor);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_set_property (GObject *object,
|
clutter_stage_set_property (GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
@ -185,11 +195,14 @@ static void
|
|||||||
clutter_stage_class_init (ClutterStageClass *klass)
|
clutter_stage_class_init (ClutterStageClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||||
ClutterStageClass *stage_class = CLUTTER_STAGE_CLASS (klass);
|
ClutterStageClass *stage_class = CLUTTER_STAGE_CLASS (klass);
|
||||||
|
|
||||||
gobject_class->set_property = clutter_stage_set_property;
|
gobject_class->set_property = clutter_stage_set_property;
|
||||||
gobject_class->get_property = clutter_stage_get_property;
|
gobject_class->get_property = clutter_stage_get_property;
|
||||||
|
|
||||||
|
actor_class->paint = clutter_stage_paint;
|
||||||
|
|
||||||
stage_class->delete_event = clutter_stage_delete_event;
|
stage_class->delete_event = clutter_stage_delete_event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -214,7 +214,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
|||||||
|
|
||||||
if (stage_glx->xwin == None)
|
if (stage_glx->xwin == None)
|
||||||
{
|
{
|
||||||
CLUTTER_NOTE (MISC, "XCreateSimpleWindow");
|
CLUTTER_NOTE (MISC, "Creating stage X window");
|
||||||
stage_glx->xwin = XCreateSimpleWindow (stage_glx->xdpy,
|
stage_glx->xwin = XCreateSimpleWindow (stage_glx->xdpy,
|
||||||
stage_glx->xwin_root,
|
stage_glx->xwin_root,
|
||||||
0, 0,
|
0, 0,
|
||||||
@ -238,7 +238,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
|||||||
if (stage_glx->gl_context)
|
if (stage_glx->gl_context)
|
||||||
glXDestroyContext (stage_glx->xdpy, stage_glx->gl_context);
|
glXDestroyContext (stage_glx->xdpy, stage_glx->gl_context);
|
||||||
|
|
||||||
CLUTTER_NOTE (GL, "glXCreateContext");
|
CLUTTER_NOTE (GL, "Creating GL Context");
|
||||||
stage_glx->gl_context = glXCreateContext (stage_glx->xdpy,
|
stage_glx->gl_context = glXCreateContext (stage_glx->xdpy,
|
||||||
stage_glx->xvisinfo,
|
stage_glx->xvisinfo,
|
||||||
0,
|
0,
|
||||||
@ -360,13 +360,9 @@ clutter_stage_glx_paint (ClutterActor *self)
|
|||||||
ClutterColor stage_color;
|
ClutterColor stage_color;
|
||||||
static GTimer *timer = NULL;
|
static GTimer *timer = NULL;
|
||||||
static guint timer_n_frames = 0;
|
static guint timer_n_frames = 0;
|
||||||
static ClutterActorClass *parent_class = NULL;
|
|
||||||
|
|
||||||
CLUTTER_NOTE (PAINT, " Redraw enter");
|
CLUTTER_NOTE (PAINT, " Redraw enter");
|
||||||
|
|
||||||
if (!parent_class)
|
|
||||||
parent_class = g_type_class_peek_parent (CLUTTER_STAGE_GET_CLASS (stage));
|
|
||||||
|
|
||||||
if (clutter_get_show_fps ())
|
if (clutter_get_show_fps ())
|
||||||
{
|
{
|
||||||
if (!timer)
|
if (!timer)
|
||||||
@ -383,7 +379,8 @@ clutter_stage_glx_paint (ClutterActor *self)
|
|||||||
glDisable (GL_LIGHTING);
|
glDisable (GL_LIGHTING);
|
||||||
glDisable (GL_DEPTH_TEST);
|
glDisable (GL_DEPTH_TEST);
|
||||||
|
|
||||||
parent_class->paint (self);
|
if (CLUTTER_ACTOR_CLASS (clutter_stage_glx_parent_class)->paint)
|
||||||
|
CLUTTER_ACTOR_CLASS (clutter_stage_glx_parent_class)->paint (self);
|
||||||
|
|
||||||
if (stage_glx->xwin)
|
if (stage_glx->xwin)
|
||||||
{
|
{
|
||||||
@ -417,10 +414,9 @@ clutter_stage_glx_allocate_coords (ClutterActor *self,
|
|||||||
{
|
{
|
||||||
ClutterStageGlx *stage_glx = CLUTTER_STAGE_GLX (self);
|
ClutterStageGlx *stage_glx = CLUTTER_STAGE_GLX (self);
|
||||||
|
|
||||||
|
box->x1 = box->y1 = 0;
|
||||||
box->x2 = box->x1 + stage_glx->xwin_width;
|
box->x2 = box->x1 + stage_glx->xwin_width;
|
||||||
box->y2 = box->y1 + stage_glx->xwin_height;
|
box->y2 = box->y1 + stage_glx->xwin_height;
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user