Mipmapped text is enabled by default in Clutter but it can cause
problems on some drivers so it is convenient to have an environment
variable to disable it for all apps.
An assert to verify there was no error when generating a buffer object
for the vertex buffer API was being hit when running the GLES1 conformance
tests.
Bug #1457 - Creating a new texture messes up the cogl material state
cache; reported by Neil Roberts
We still don't have caching of bound texture state so we always have to
re-bind the texture when flushing the GL state of any material layers.
Bug #1460 - Handling of flags in cogl_material_set_color
Cogl automatically enables/disables blending based on whether the source color
has an alhpa < 1.0, or if any textures with an alpha component are in use, but
it wasn't doing it quite right.
At the same time I removed some of the dirty flags which on second thought
are nothing more than micro-optimsations that only helped clutter the code.
thanks to Owen Taylor for reporting the bug
Since the CoglMatrix type was added for supporting texture matrices recently
it made sense to be consistent accross the Cogl API and use the Cogl type
over the GL style GLfloat m[16] arrays.
The INCLUDES directive should only contain pre-processor flags, since
we're passing it also to the introspection scanner.
Using AM_CFLAGS for compiler flags, like debug flags and maintainer
flags, is more indicated.
Bug 1442 - multistage, same-window resize events invalidate stage
When ensuring that the GL context is attached to the correct
ClutterStage we need to set the SYNC_MATRICES flag on the stage
itself. This is needed in case the size of the new stage does
not match the size of the old -- thus requiring a call to
glViewport() when the paint cycle starts.
cogl_wrap_glActiveTexture needs to call the GL version of
glActiveTexture otherwise the subsequent calls to glBindTexture will
all be using texture unit 0. This fixes test-cogl-multitexture.
Previously the texture unit settings were stored in growable GArrays
and every time a new texture unit was encountered it would expand the
arrays. However the array wasn't copied when stored in a
CoglGles2WrapperSettings struct so all settings had the same
array. This meant that it wouldn't detect that a different program is
needed if a texture unit is disabled or enabled.
The texture unit settings arrays are all now a fixed size and the
enabledness of each unit is stored in a bit mask. Therefore the
settings can just be copied around by assignment as before.
This puts a limit on the number of texture units accessible by Cogl
but I think it is worth it to make the code simpler and more
efficient. The material API already poses a limit on the number of
texture units it can use.
configure.ac: Check for gobject-introspection
build/introspection.m4: Include the file that defines the
GOBJECT_CHECK_INTROSPECTION m4 macro in case we want to disable
the introspection data generation.
clutter/json/Makefile.am: Build the .gir for "ClutterJson"
(json-glib as part of the Clutter library)
clutter/Makefile.am: Build the .gir for clutter, compile the
Clutter and ClutterJson girs into typelibs, and install them.
Also move GCC_FLAGS from $(INCLUDES) to $(AM_CFLAGS) since it includes
non-preprocessor flag like -Wall.
See also:
http://bugzilla.openedhand.com/show_bug.cgi?id=1450
Based on a patch by: Owen W. Taylor <otaylor@fishsoup.net>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Add annotations such as (transfer-none) (out) (element-type ClutterActor),
and so forth to the doc comments as appropriate.
The annotations added here are a combination of the annotations previously
in gir-repository for Clutter and annotations found in a review of all
return values with that were being parsed with a transfer of "full".
http://bugzilla.openedhand.com/show_bug.cgi?id=1452
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The new stable release of gtk-doc provides the --name-space
option for the mkdb utility. This option allows to specify a
namespace for the symbols that will get stripped, so that we
don't get a symbols index containing only "C".
Bug 1464 - clutter_timeline_list_markers should set n_markers=0 when
there are no markers
If no markers are registered and we bail out we should also set the
n_markers out parameter to 0 so that code checking the number of
markers will still work.
Bug 1465 - clutter_path_parse_description should check p==NULL
When accepting a stringified path description, ClutterPath methods
and the parser should not accept NULL or empty strings.
Bug 1463 - clutter_color_lighten(darken) unexpected because of
ClutterFixed=>float
These two functions contained ClutterFixed constants represented as
integers which are no longer valid since the cogl-float branch
merge. They are now converted to ClutterFixed from float constants
using CLUTTER_FLOAT_TO_FIXED (which is now a no-op).
Thanks to Zhang Wei for reporting.
The ChangeLog should only be generated by dist-hook and as a temporary
file to avoid overwriting the stub we use to direct people to the
commit log when cloning the repository.
When generated, the ChangeLog should be copied inside the distdir so
that the autotools will not freak out.
The TEST_CONFORM_TODO macro is a simple placeholder macro that
adds the test function to the "/todo" namespace and skips the
test.
It can be used for tests that are known to fail because of bugs
that haven't been fixed yet, or because of features not yet
implemented.
test-vertex-buffer-configuous now needs redhand.png so it should be
copied in to the build directory. This is copied from similar code in
the tests/interactive Makefile.
This causes clutter to skip all the GL work of state changes and
texturing if the opacity was 0. This is done in ClutterTexture and not
ClutterActor to ensure that pre and post paint signals work correctly.
Other expensive actors should be doing the same thing.
The call to "cmp" to compare a built file with its current version
should use the -s (silent) command line switch. This avoids a ugly
message on the console when building Clutter the first time.
When setting the COGL texture handle for a ClutterTexture the
texture will be set as the first layer of the material used
by the ClutterTexture. The documentation should clarify this
point.
The :texture and :material properties of ClutterTexture use a
Clutter-provided GType shielding from CoglHandle. Since CoglHandle
now has a GType we can use COGL_TYPE_HANDLE instead.
This commit also removes the conditional compilation of the
:material property, as it makes little sense now that the
Materials API has landed.
COGL types should be registered inside the GType system, for
bindings and type checking inside properties and signals.
CoglHandle is a boxed type with a ref+unref semantics; slightly evil
from a bindings perspective (we cannot associate custom data to it),
but better than nothing.
The rest of the exposed types are enumerations or bitmasks.
The COGL_DEFINE_HANDLE macro generates a cogl_is_<type> function
as well, to check whether a CoglHandle opaque pointer is of type
<type>.
The handle for CoglMaterial does not export cogl_is_material() in
its installed header.
gtk-doc.make does not specify --tag=CC when invoking libtool, letting
it decide which tag to use. Something that fails with libtool 1.x and
when having CC set to funny things.
The rotation angle calculated in clutter_behaviour_rotate_alpha_notify
gets applied to each actor using clutter_behaviour_actors_foreach. The
angle is a ClutterFixed value. Before the cogl float branch merge it
was stuffed into a gpointer using GPOINTER_TO_UINT. The pointer was
then converted back to a uint and cast to a ClutterFixed which worked
out fine even for negative numbers.
After the cogl-float merge the angle is effectively a gfloat. This
gets cast to a uint and stored in a pointer and converted back to a
float via a uint at the other end. However this fails for negative
numbers because a uint -> float conversion can't take advantage of
overflow to preserve the sign so you end up with a large number.
It also had the side effect that it only rotated in whole degrees.
This commit fixes the problem by just passing the ClutterFixed value
inside a closure struct instead of trying to stuff it into a pointer.
From the homepage (http://dolt.freedesktop.org): Dolt provides a drop-in
replacement for libtool that significantly decreases compile times on
the platforms it supports.
Bug 1167 - clutter_effect_rotate improperly clamps negative angles
The rotation angle properties had a minimum value of 0.0 but the
rotation works fine with a negative value so the limitation is
unnecessary. This makes rotation using the ClutterAnimation API more
flexible because it was previously not possible to rotate
counter-clockwise from the 0.0 position.
When rendering a clone before this commit the clone's opacity was
combined with the opacity of the source but this is not usually the
desired effect. Instead the clone's opacity (combined with its
parents) should completely override the opacity of the source.