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
Since eef9078f ClutterStage updates the aspect ratio of the
perspective matrix whenever the size of the stage changes. This meant
that if an application tries to set its own perspective matrix then
part of it would get overridden. It's not really clear what the
use-case of setting the perspective on the stage should be but it
seems like the safest bet is to always try to preserve the
application's request. The documentation for the function has been
tweaked to discourage its use.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2625
Some parts of the StageWindow interface aren't meaningful for all window
systems. This makes stage_window_set_title/fullscreen/cursor_visible
optional instead of requiring those window systems to implement empty
stubs. Notably the empty stubs we had in the Cogl backend (previously
the EGL backend) used g_warning to report the feature as unsupported and
that was causing conformance test failures.
Since GLX and EGL are abstracted by Cogl the two backends are both
implementing everything using the Cogl API and they are almost
identical.
This updates the egl backend to support everything that the glx backend
supports. Now that EGL and GLX are abstracted by Cogl, the plan is that
we will squash the clutter-egl/glx backends into one. Since the EGL
backend in clutter can conditionally not depend on X11 we will use the
EGL backend as the starting point of our common backend.
https://bugzilla.gnome.org/show_bug.cgi?id=649826
We hadn't updated the egl backend inline with a change to the arguments
that cogl_onscreen_x11_set_foreign_window_xid would expect and that was
causing a compilation error.
* swipe-action:
test-swipe-action: Clean up the test code
docs: Add the new actions to the API reference
gesture-action: Remove the multi-device entry points
swipe-action: Remove the required devices call
swipe-action: Clean up
gesture-action: Clean up
Add ClutterSwipeAction and ClutterGestureAction
Do not just allow animating states connected to signals: add a "warp"
optional key that ends up calling clutter_state_warp_to_state(). This
is useful for debugging.
Currently, defining states for object signals can only be done by
defining a ClutterState inside the ClutterScript definition. We should
allow creating a (named) ClutterState in code, and associating it to a
ClutterScript instance — and have the Script resolve the "state" field
of a signal definition correctly.
One of the uses of a ClutterState state machine along with ClutterScript
is to provide a quick way to transition from state to state in response
to signal emitted on specific instances.
Connecting a real function, in code, to a specific signal does not
improve the ease of use of ClutterScript to define scenes.
By adding a new signal definition to the current one we can have both a
simple way to define application logic in code and in the UI definition
file.
The new syntax is trivial:
{
"name" : <signal name>,
"state" : <state machine script id>,
"target-state" : <target state>
}
The ClutterState instance is identified by its script id, and the target
state is resolved at run-time, so it can be defined both in
ClutterScript or in code. Ideally, we should find a way to associate a
default ClutterState instance to the ClutterScript one that parses the
definition; this way we would be able to remove the "state" member, or
even "style" the behaviour of an object by replacing the ClutterState
instance.
The implementation uses a signal emission hook, to avoid knowing the
signal signature; we check the emitter of the signal against the object
that defined the signal, to avoid erroneous state changes.