We were checking HAVE_COGL_GLES2 but this is not publicly defined by
Cogl so since splitting Cogl from Clutter test-cogl-materials.c would
not have built against gles2 since it would end up enabling the GL
specific code path which would reference an undefined symbol.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This removes the is_axis_aligned assertions for the width/height/depth
getters and setters, since for example it is legitimate to query the
width, height or depth of a container's child actors which aren't
necessarily axis aligned.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
cogl_renderer_xlib_set_foreign_display was renamed to
cogl_xlib_renderer_set_foriegn_display so this is the corresponding
change to clutter.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The generic cogl_renderer_handle_native_event API was removed from the
Cogl public API in favour of typesafe functions, so this updates the
win32 backend in line with that change.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The recommended command to check for differences from master to the
remote master was using git log with a range from the local master to
the remote master but this wouldn't work if the local master is ahead
of the remote master because the range is backwards. This patch
changes it to recommend git diff --stat instead because then the
command would work even if the two branches have diverged.
It is possible, by calling clutter_set_motion_events_enabled() prior to
the creation of any stage, to control the per-actor motion event
delivery flag on each newly created stage. Since we deprecated the
global accessor functions in favour of the per-Stage ones, we need to
remove the call to clutter_get_motion_events_enabled() inside the
ClutterStage instance initialization, and replace it with an internal
function.
This code will go away when we can finally break API and remove the
deprecated functions.
Complete the quest of commit bc548dc862
by making the ClutterStage methods for controlling the per-actor motion
and crossing event delivery public, and deprecating the global ones.
Although this patch doesn't make them public, it documents the
_clutter_actor_get/apply_relative_transform_matrix functions so they
could easily be made public if desired. I think these API could be
useful to have publicly, and I originally documented them because I
thought they would be needed in the MX toolkit.
Previously ClutterActor was using priv->propagated_one_redraw to
determine whether to pass CLUTTER_EFFECT_PAINT_ACTOR_DIRTY to the
paint method of the effect. This isn't a good idea because the
propagated_one_redraw flag is cleared whenever clutter_actor_paint is
called, even if the actor isn't actually painted because of the zero
opacity shortcut. Instead of this, ClutterActor now has a separate
flag called is_dirty that gets set whenever queue_redraw_full is
called or whenever the queue redraw signal is bubbled up from a child
actor. The flag is only cleared in clutter_actor_paint if the effects
are actually run. Therefore it will stay set even if the opacity is
zero or if the parent actor decides not to paint the child.
Previously there were two places set propagated_one_redraw to FALSE -
once if the opacity is zero and once just before we emit the paint
signal. Now that propagated_one_redraw is only used to determine
whether to pass on the queue redraw signal it seems to make sense to
just clear it in one place right at the start of clutter_actor_paint.
https://bugzilla.gnome.org/show_bug.cgi?id=651784
On reviewing the clutter-actor.c code using
_apply_modelview_transform_recursive I noticed various comments stating
that it will never call the stage's ->apply_transform vfunc to transform
into eye coordinates, but actually looking at the implementation that's
not true. The comments probably got out of sync with an earlier
implementation that had that constraint. This removes the miss-leading
comments and also updates various uses of the api where we were manually
applying the stage->apply_transform.
Instead of using the cogl_vertex_buffer API this uses the more concise
cogl_primitive API instead. The aim is to get rid of the
cogl_vertex_buffer API eventually so we should be trying out the
replacement API wherever possible.
When using CLUTTER_PAINT=paint-volumes to visualize the paint-volumes of
actors we were already disabling clipped-redraws because we are drawing
extra geometry that the actors don't know about but we didn't disable
culling. This was resulting in actors disappearing while using this
debug option.
This makes sure we don't try and draw paint-volumes or culling results
during a pick cycle since that results in us reading back invalid ids
from the pick-buffer.
This adds CLUTTER_PAINT=disable-offscreen-redirect to help diagnose
problems with the correct opacity changes. This just makes it so that
it never installs the flatten effect so it will never automatically
redirect an actor offscreen.
This removes the pv->is_xis_aligned assertion in
_clutter_paint_volume_union. We were already considering the case where
the second volume may not be axis aligned and aligning it into a
temporary variable in that case, but we now also consider that the first
pv may also not be aligned.
The removes the pv->is_complete assertion from
_clutter_paint_volume_axis_align() and instead if the volume isn't
complete it calls _clutter_paint_volume_complete().
When calculating the union of a volume with an empty volume we aim to
simply take the contents of the non-empty volume, but we were not
copying the flags across. We now use
_clutter_paint_volume_set_from_volume which copies all the flags except
the is_static flag.
In _clutter_paint_volume_set_from_volume we were using memcpy to simply
copy everything from one volume to another, but that meant we were
trashing the is_static flag which determines if the destination
paint-volume was slice allocated or not.
This removes the constraint that a paint-volume must be axis aligned
before _clutter_paint_volume_complete can be called. NB: A paint volume
is represented by one origin vertex and then three axis vertices to
define the width, height and depth of the volume. It's straightforward
to use the vectors from the origin to the axis vertices to deduce the
other 4 vertices so we can remove the is_axis_aligned assertion.
Since eef9078f the translation of the camera away from the z=zero
plane was hardcoded at 50 which is approximately half way between the
default z_near and z_far values. This ended up with quite a small
distance in user-space coordinates to the far plane with the default
stage size and this was causing test-texture-quality to clip the actor
early.
This patch makes it try to calculate a reasonable value for the
position of the z=0 plane as well as a value for z_far so we maximize
the space in between the z=0 plane and the near plane and we have a
predictable amount of space behind the stage before hitting the far
clipping plane, while considering the trade off of loosing depth
precision by pushing the far plane too far back relative to the near
plane.
With the default fov of 60° it's not possible to use the stage size to
define the gap in-front of the stage plane; only ~87% of the stage size
is possible as an upper limit. We make 85% of the stage_height available
assuming you have a fov of 60°. We consistently provide 10 times the
stage height of space behind the stage regardless of the fov.
It seems worth noting here that we went around in circles a few times
over how to calculate the gaps since there are a number of trade offs to
consider and they also affect the complexity of the solution. In the end
we went for simplicity but commented the issues well enough hopefully so
we can develop a more elaborate solution if we ever have a use-case.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2625