Damien Lespiau [Tue, 17 Feb 2009 14:56:35 +0000 (14:56 +0000)]
[build] Beautify autotools' output
Use shave (http://git.lespiau.name/cgit/shave) to make compilation more
human friendly.
Damien Lespiau [Tue, 17 Feb 2009 14:02:55 +0000 (14:02 +0000)]
[gitignore] update gitignore files for tests/
Neil Roberts [Wed, 18 Feb 2009 17:26:10 +0000 (17:26 +0000)]
Allow rotation angle properties to be negative
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.
Neil Roberts [Wed, 18 Feb 2009 16:41:01 +0000 (16:41 +0000)]
Override the opacity when painting a clone instead of combining
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.
Tomas Frydrych [Wed, 18 Feb 2009 16:54:18 +0000 (16:54 +0000)]
[x11] Only update cached last event time if we have a real timestamp.
Ignore the timestamp if it is set to CurrentTime (e.g., when the last event
did not carry a timestamp).
Robert Bragg [Wed, 18 Feb 2009 16:06:11 +0000 (16:06 +0000)]
[cogl-color.c] #include fix for the cogl_set_source_color prototype
cogl.h wasn't being included so we got a compiler warning
Robert Bragg [Thu, 12 Feb 2009 13:23:20 +0000 (13:23 +0000)]
[Cogl] Renames cogl_paint_init to cogl_clear and adds a cogl_disable_fog function
cogl_paint_init was a bit too miscellaneous; it mainly cleared the color, depth
and stencil buffers but arbitrarily it also disabled fogging and lighting.
It no longer disables lighting, since we know Cogl never enables lighting and
disabling of fog is now handled with a seperate function.
Since I noticed cogl_set_fog was taking a density argument documented as
"Ignored" I've also added a mode argument to cogl_set_fog which exposes the
exponential fog modes which can make use of the density.
Robert Bragg [Thu, 12 Feb 2009 11:08:00 +0000 (11:08 +0000)]
[Cogl] cogl_clip_{set*,unset} renamed to cogl_clip_{push*,pop}
This is so they self document the stacking semantics of the cogl clip API
Øyvind Kolås [Tue, 17 Feb 2009 12:00:08 +0000 (12:00 +0000)]
Added a mutex for clutter asynchronous textures threads.
Bug #1453 - Asynchronous texture loading can starve cpu.
Add a mutex that is held in the loader threads during the image
decoding. We were spawning and starting a thread for each asynchronously
loaded texture. This can cause cpu / memory starvation when many pixbuf
loaders allocate their temporary memory at the same time.
Also added -fno-strict-aliasing to MAINTAINER_CFLAGS in configure.ac
to avoid incorrect warnings caused by the static mutex code.
Emmanuele Bassi [Wed, 18 Feb 2009 09:45:26 +0000 (09:45 +0000)]
[x11] Add backend-specific get_current_event_time()
The clutter_get_current_event_time() function will return the event
timestamp coming from a Clutter event. Clutter might synthesize or
throttle events, so the function cannot be used when dealing with
backend-specific use cases.
The X11 backend is the only backend supported by Clutter that makes
use of timestamps, so it's altogether fitting that it should come
with a specific function to deal with the timestamps of the X events.
Neil Roberts [Mon, 16 Feb 2009 16:34:31 +0000 (16:34 +0000)]
[clutter-main] Fix the input device passed to set_motion_last_actor
In generate_enter_leave_events it passes the device pointer from the
event to set_motion_last_actor but it was reading it directly from
event->motion.device. However the function is also used to process
button events so it would read from the wrong location in this case.
The device location in the union happened to be in the same place as
the click_count field of ClutterButtonEvent so it only mattered if the
click_count is non-zero. The X11 backend doesn't set this but
Clutter-GTK does so it was causing a crash.
Neil Roberts [Mon, 16 Feb 2009 12:46:00 +0000 (12:46 +0000)]
[win32] Track mouse leave messages
Bug 1178 - No enter / leave events on actors when pointer leaves the
stage window
This patch causes the Win32 backend to emit CLUTTER_LEAVE events when
a WM_MOUSELEAVE event is received in the same way that f505536 does
for the X11 backend.
Windows will only send WM_MOUSELEAVE events if they are previously
requested using TrackMouseEvent so this needs to be called whenever
the mouse enters the window. There is no WM_MOUSELEAVE event but we
can detect when the mouse enters because we get a WM_MOUSEMOVE event.
Neil Roberts [Mon, 16 Feb 2009 12:42:08 +0000 (12:42 +0000)]
Call glActiveTexture and glClientActiveTexture through cogl_get_proc_address
All GL functions that are defined in a version later than 1.1 need to
be called through cogl_get_proc_address because the Windows GL DLL
does not export them to directly link against.
Neil Roberts [Thu, 12 Feb 2009 17:21:18 +0000 (17:21 +0000)]
Emit CLUTTER_LEAVE events when the pointer leaves the stage
Bug 1178 - No enter / leave events on actors when pointer leaves the
stage window
The patch is mostly thanks to Johan Bilien with small modifications
based on suggestions by Owen Taylor.
The X11 backend now listens for enter and leave notifications. Leave
notifications get translated directly to a CLUTTER_LEAVE
event. Clutter can detect these special events because the source
actor is NULL in which case it sets the source actor to the last known
actor and then sets the last known actor to NULL.
Enter notifications just get translated to CLUTTER_MOTION events which
will cause Clutter to generate an enter event through the usual code
path.
Emmanuele Bassi [Mon, 16 Feb 2009 11:02:20 +0000 (11:02 +0000)]
[animation] Do not bind construct-only properties
ClutterAnimation should not try to bind construct-only properties,
since it only manipulates existing instances.
Emmanuele Bassi [Sat, 14 Feb 2009 13:11:13 +0000 (13:11 +0000)]
[actor] Revert part of commit
402e022c
An unintended chunk of commit
402e022c got committed before I looked
at the diff.
Christian Persch [Sat, 14 Feb 2009 12:55:20 +0000 (12:55 +0000)]
Bug 1429 - Redundant declaration in clutter-x11.h
clutter-x11.h declares clutter_x11_set_display twice, which means code using
clutter doesn't compile cleanly with -Wredundant-decls.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Owen W. Taylor [Fri, 13 Feb 2009 19:14:43 +0000 (14:14 -0500)]
Honor ACLOCAL_FLAGS in autogen.sh
autoreconf doesn't pay attention to the ACLOCAL_FLAGS variable that
jhbuild (for example) sets. Pass those flags into autoreconf by
setting ACLOCAL appropriately.
Shane Bryan [Wed, 4 Feb 2009 01:04:58 +0000 (17:04 -0800)]
Bug 1434 - _NET_WM_NAME not set before realize
Moved clutter_stage_set_title() before call to clutter_actor_realize()
to ensure _NET_WM_NAME is set early enough for use by interested WM's,
Signed-off-by: Shane Bryan <shane.bryan@linux.intel.com>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Sat, 14 Feb 2009 11:47:53 +0000 (11:47 +0000)]
[ignore] Add the newly created conformance units
Emmanuele Bassi [Sat, 14 Feb 2009 11:45:27 +0000 (11:45 +0000)]
[tests] Add conformance tests for ClutterModel
ClutterModel has an interactive test but lacks a conformance
unit for automatic testing.
This is the beginning of that unit, which covers the population
and iteration over a ListModel.
Emmanuele Bassi [Sat, 14 Feb 2009 11:41:55 +0000 (11:41 +0000)]
[tests] Add TEST_CONFORM_SKIP() macro
Sometimes a test unit should not be executed depending on a
condition. It would be good to have a macro doing this, along
with TEST_CONFORM_SIMPLE().
Additionally, the skipped unit should be added to a specific
namespace, so that any coverage report will be able to catch it.
For this reason, here's TEST_CONFORM_SKIP() which follows the
syntax:
TEST_CONFORM_SKIP (condition, namespace, function);
If condition evaluates to FALSE the test is skipped and the
unit added to the "/skipped" namespace.
Emmanuele Bassi [Sat, 14 Feb 2009 11:38:16 +0000 (11:38 +0000)]
Bug 1440 - Add clutter_get_current_event_time()
The clutter_get_current_event_time() is a global function for
retrieving the timestamp of the current event being propagated
by Clutter. Such function avoids the need to propagate the
timestamp from within user code.
Emmanuele Bassi [Sat, 14 Feb 2009 11:31:00 +0000 (11:31 +0000)]
[list-model] Make ClutterListModel subclassable
ClutterListModel has been added as a terminal class in case we
decided to change API or implementation.
Apparently, it's a lot more resilient than we expected -- or far
too few are using it and reporting bugs. Once common issue, though,
is that it cannot be subclassed, hence it's fairly limited in its
usage.
In the hope that more developers will start using it, here's a
patch that makes ListModel a fully subclassable object.
May whatever god you believe in have mercy on your eventual soul.
Robert Staudinger [Thu, 12 Feb 2009 12:42:58 +0000 (12:42 +0000)]
[build] Add cogl.h to the built sources list
The main COGL header file is generated at configure time. If something
changes in the template, though, the file will not be regenerated.
Adding cogl.h to the BUILT_SOURCES list will allow the regeneration to
happen.
Emmanuele Bassi [Wed, 11 Feb 2009 17:56:22 +0000 (17:56 +0000)]
[actor] Check out parameters before setting them
The clutter_actor_get_rotation() out parameters may be NULL, so
we need to check before dereferencing them.
Emmanuele Bassi [Wed, 11 Feb 2009 17:54:52 +0000 (17:54 +0000)]
[event] Extend KeyEvent for multi-input support
Key events can come from different input devices, so they need a
ClutterInputDevice member like the pointer-related events. This
field is reserved for future use.
Emmanuele Bassi [Wed, 11 Feb 2009 17:52:50 +0000 (17:52 +0000)]
[texture] Check if the material is valid
The CoglMaterial handle might be invalid when we are disposing
the ClutterTexture, so we need to check before calling any
cogl_material_* API on it.
Emmanuele Bassi [Fri, 6 Feb 2009 13:50:16 +0000 (13:50 +0000)]
[texture] Consolidate the quality to filter conversions
To convert from a TextureQuality to a COGL filter enumeration
we need to perform two function calls. Since we need both filters
when calling cogl_texture_set_filters() we can safely consolidate
the two conversion functions into one. This also allows using a
shorter function name, thus reducing the lenght of the lines
involved and, more importantly preventing Emmanuele from crying.
Robert Bragg [Wed, 11 Feb 2009 12:58:18 +0000 (12:58 +0000)]
[tests] Some improvements for test-pixmap
The test no longer requires an XID argument to run; instead it creates its
own X Window. The test now also aims to demonstrate whether mipmapping is
working, and clearly informs you if fallbacks are being used for GLX tfp.
Robert Bragg [Fri, 6 Feb 2009 11:16:42 +0000 (11:16 +0000)]
[docs] Various gtk-doc updates for Cogl
This hides a number of internal structs and enums from the docs, and moves
some functions to more appropriate sections as well as misc description
updates (mostly for the vertex buffer api)
Robert Bragg [Fri, 6 Feb 2009 16:10:28 +0000 (16:10 +0000)]
[cogl-vertex-buffer] Some fixes for texturing and color arrays
Fixes some blending issues when using color arrays since we were
conflicting with the cogl_enable state + fixes a texture layer
validation bug.
Adds a basic textured triangle to test-vertex-buffer-contiguous.
Robert Bragg [Fri, 6 Feb 2009 16:05:08 +0000 (16:05 +0000)]
[cogl-material] Fixes some dirty flag checks
Flushing material layers wasn't clearing the right dirty flag and
some of the tests used to avoid re-submitting GL state weren't
complete.
Robert Bragg [Wed, 4 Feb 2009 09:21:37 +0000 (09:21 +0000)]
[Cogl] Renames cogl_fog_set to cogl_set_fog for consistency
More things follow the <object>_set_<property> convention.
Neil Roberts [Mon, 9 Feb 2009 12:47:41 +0000 (12:47 +0000)]
Added a test for non-power-of-two sized textures
The test simply creates an odd sized texture with different colors at
each of the four corners. It then renders the texture and verifies
that the colors are the expected values. This should help ensure that
the sliced texture rendering code is working properly.
Neil Roberts [Thu, 5 Feb 2009 23:01:59 +0000 (23:01 +0000)]
[cogl-texture] Fix uninitialised priv var in texture_finalize
Fix my failure to initialise the priv var which was some causing
crashes.
Neil Roberts [Thu, 5 Feb 2009 20:24:18 +0000 (20:24 +0000)]
[cogl-texture] Move the destruction of the material to _finalize
Otherwise if the dipose method is called twice the material will
already be destroyed when texture_free_gl_resources is called so it
will issue a warning about an invalid handle.
Neil Roberts [Thu, 5 Feb 2009 19:48:00 +0000 (19:48 +0000)]
[cogl-texture] Fix offset to next quad when flushing the log
When the quad log contains multiple textures (such as when a sliced
texture is drawn) it dispatches the log with multiple calls to
flush_quad_batch and walks a pointer along the list of vertices.
However this pointer was being incremented by only one vertex so the
next quad would be drawn with three of the vertices from the last
quad.
Neil Roberts [Thu, 5 Feb 2009 20:00:05 +0000 (20:00 +0000)]
[clutter-texture] Fix the no_slice property
The 'no_slice' property means the texture should never be sliced. We
want cogl to create a texture with any amount of waste so we pass
max_waste as -1. However this got broken in commit 168d55 so that the
meaning got negated (no_slice enabled slicing).
Chris Lord [Thu, 5 Feb 2009 11:04:34 +0000 (11:04 +0000)]
[actor] Force a relayout on set_parent()
The current code that handles the invariant that the new parent
of an actor needing a layout should also be queued for relayout
is hitting the short-circuiting we do in the queue_relayout()
method.
In order to fix this we can forcibly set the actor to need a
width/height request and an allocation; then we queue a relayout
on the parent.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 2 Feb 2009 23:55:30 +0000 (23:55 +0000)]
[text] Rename :alignment to :line-alignment
The :alignment property is prone to generate confusion: developers
will set it thinking that the contents of a ClutterText will
automagically align themselves.
Instead of using the generic term :alignment, and following the
GTK+ convention, we should use a more specific term, conveying the
actual effect of the property: alignment of the lines with respect
to each other, and not to the overall allocated area.
See bug 1428:
http://bugzilla.openedhand.com/show_bug.cgi?id=1428
Neil Roberts [Thu, 5 Feb 2009 18:27:04 +0000 (18:27 +0000)]
[clutter-texture] Unref the Cogl material on dispose
The material is created in the _init function and is owned by the
ClutterTexture so it will be leaked if not freed.
Neil Roberts [Thu, 5 Feb 2009 18:26:08 +0000 (18:26 +0000)]
[clutter-texture] Release the temporary ref taken when setting a texture
When setting the cogl texture, the ClutterTexture takes a reference to
the Cogl handle but the material takes an additional reference when it
is set as the layer. Nothing was unrefing the temporary reference so
the textures were being leaked.
Neil Roberts [Wed, 4 Feb 2009 00:14:16 +0000 (00:14 +0000)]
[clutter-clone] Override the parent opacity to self not self->parent
The opacity of the source actor when painted from the clone should be
combined with the opacity of the clone as well as the clone's parents,
instead of just the parents.
Neil Roberts [Mon, 2 Feb 2009 22:02:47 +0000 (22:02 +0000)]
[cogl-gles2-wrapper] Remove the FIXME to adjust the fragment color
Removed some debugging code which sets the r and g values to 1 in the
fragment shader.
Neil Roberts [Mon, 2 Feb 2009 22:01:47 +0000 (22:01 +0000)]
[cogl-texture] Fix the count for the number of enabled arrays
The quad drawing code keeps track of the number of texture units that
have the tex coord array enabled so that in the next call it can
disabled any that are no longer enabled. However it was using 'i+1' as
the count but 'i' is already set to 'n_layers' from the previous for
loop.
Therefore it was disabling an extra texture unit. This doesn't
normally matter but it was causing GLES 2 to pointlessly realize an
extra unit.
Neil Roberts [Thu, 29 Jan 2009 13:40:37 +0000 (13:40 +0000)]
Fix building GLES 2 after the material branch merge
- In cogl-material.h it directly sets the values of the
CoglMaterialLayerCombineFunc to some GL_* constants. However these
aren't defined in GLES 2 beacuse it has no fixed function texture
combining. Instead the CGL_* versions are now used. cogl-defines.h
now sets these to either the GL_* version if it is available,
otherwise it directly uses the number.
- Under GLES 2 cogl-material.c needs to access the CoglTexture struct
so it needs to include cogl-texture-private.h
- There are now #define's in cogl-gles2-wrapper.h to remap the GL
function names to the wrapper names. These are disabled in
cogl-gles2-wrapper.c by defining COGL_GLES2_WRAPPER_NO_REMAP.
- Added missing wrappers for glLoadMatrixf and glMaterialfv.
- Renamed the TexEnvf wrapper to TexEnvi because the latter is used
instead from the material API.
Neil Roberts [Mon, 2 Feb 2009 14:51:52 +0000 (14:51 +0000)]
[cogl-material] Always bind the new texture handle
Cogl previously tried to cache the currently bound texture when
drawing through the material API to avoid excessive GL calls. However,
a few other places in Cogl and Clutter rebind the texture as well so
this can cause problems.
This was causing shaped windows to fail in Mutter because
ClutterGLXTexturePixmap was binding a different texture to update it
while the second texture unit was still active which meant the mask
texture would not be selected when the shaped window was drawn
subsequent times.
Ideally we would fix this by providing a wrapper around glBindTexture
which would affect the cached value. The cache would also have to be
cleared if a selected texture was deleted.
Emmanuele Bassi [Mon, 2 Feb 2009 12:04:34 +0000 (12:04 +0000)]
[text] Use create_pango_layout()
Since we added clutter_actor_get_pango_layout() it would be a
good idea to use it in the ClutterText actor to cut down the
PangoContext-related calls.
Emmanuele Bassi [Mon, 2 Feb 2009 11:59:39 +0000 (11:59 +0000)]
[clone] Allow cloning unparented actors
If the source of a ClutterClone does not have a parent actor the
clone will be unable to paint it because it's missing an allocation.
A simple way to fix it is to make the ClutterClone act like a
"foster parent": when it is allocated it will check if the source
actor has a parent and if not it will allocate the source with
its preferred size.
Emmanuele Bassi [Mon, 2 Feb 2009 11:08:37 +0000 (11:08 +0000)]
[docs] Add clutter_text_set_markup()
The clutter_text_set_markup() has been added to the public API, and
should be listed in the ClutterText section of the API reference.
Emmanuele Bassi [Mon, 2 Feb 2009 09:01:41 +0000 (09:01 +0000)]
Add Actor::create_pango_layout()
Final bit of integration between ClutterActor and Pango: a simple
method for creating a PangoLayout, pre-filled with text and ready
to be rendered using cogl_pango_render_layout().
This should make writing new Actors rendering custom text in their
paint() implementation easy and reliable.
Emmanuele Bassi [Thu, 29 Jan 2009 13:29:43 +0000 (13:29 +0000)]
[tests] Update the text-field interactive test
We should also display the results of calling set_markup() or
set_use_markup() on ClutterText actors.
Emmanuele Bassi [Thu, 29 Jan 2009 13:18:57 +0000 (13:18 +0000)]
[text] Merge the attributes with markup enabled
ClutterText should merge the PangoAttributes set by using
clutter_text_set_attributes() with the attributes generated by
parsing Pango markup.
For this to work we must parse the markup and merge the attributes
we get out of pango_parse_markup() with the attributes set by
the user.
Setting the markup or the attributes on an editable text should
not work for the time being.
Tomas Frydrych [Thu, 29 Jan 2009 12:25:18 +0000 (12:25 +0000)]
Fix clutter_x11_texture_pixmap_get/set_property() following change of PROP_WINDOW type.
PROP_WINDOW is now gulong, so we need to use appropriate GValue accessors.
Tomas Frydrych [Tue, 27 Jan 2009 16:37:55 +0000 (16:37 +0000)]
Fixed handling of enter and leave events in clutter_x11_handle_event()
When processing a motion event, we need to spin the event loop two extra
times to ensure that any enter/leave events that might have been synthesized
are pumped through (otherwise they end up being pushed down the queue and
never processed).
Emmanuele Bassi [Fri, 30 Jan 2009 14:18:46 +0000 (14:18 +0000)]
Post-release bump to 0.9.1
Emmanuele Bassi [Fri, 30 Jan 2009 12:39:29 +0000 (12:39 +0000)]
Update README
Robert Bragg [Thu, 29 Jan 2009 16:24:24 +0000 (16:24 +0000)]
Some updates for the 1.0 release notes regarding Cogl
Documents that the cogl_rectangle arguments changed from x1, y1, width, height
to x1, y1, x2, y2; notes that cogl_scale now accepts a z-scale; adds a note
about the new vertex buffer API and fixes a s/CoglMesh/CoglMatrix/ typo.
Emmanuele Bassi [Thu, 29 Jan 2009 16:15:05 +0000 (16:15 +0000)]
[build] Fix distcheck of ChangeLog
Relax the copy failure condition.
Emmanuele Bassi [Thu, 29 Jan 2009 16:00:15 +0000 (16:00 +0000)]
Add cogl-material-private.h to the source files
The material-private.h file was not added to the dist files and
caused a build failure.
Emmanuele Bassi [Thu, 29 Jan 2009 15:44:11 +0000 (15:44 +0000)]
[gitignore] Update ignore file
Emmanuele Bassi [Thu, 29 Jan 2009 15:38:28 +0000 (15:38 +0000)]
[build] Add automatic ChangeLog generation on dist
Since we moved to Git from Subversion we've abandoned the ChangeLog
file in favour of a more detailed commit log.
In order to maintain a ChangeLog for users of the tarballs, we need
to generate a ChangeLog file out of the commit log when distchecking
a Clutter release.
For this reason, we use a simple Perl script that is invoked by the
dist-hook and generates a ChangeLog file starting from the previous
stable release.
Emmanuele Bassi [Thu, 29 Jan 2009 13:31:11 +0000 (13:31 +0000)]
Fix a variable masking warning
The usual issue with math.h defined symbols.
Emmanuele Bassi [Wed, 28 Jan 2009 17:01:26 +0000 (17:01 +0000)]
Move the old ChangeLog into its own file
The old ChangeLog is there to track the project history when it
was in SVN -- also because the commit messages we imported from
Subversion were not that great.
Unfortunately, we need a ChangeLog for autotools to work in
GNU mode; for this reason, we can use a dummy ChangeLog redirecting
to git log.
The ChangeLog will be generated on release from the commit
messages, for users of the tarballs.
Neil Roberts [Thu, 29 Jan 2009 12:21:56 +0000 (12:21 +0000)]
[cogl] Add an NULL terminator to the call to material_flush_gl_state
This fixes a compiler warning and a potential crash.
Robert Bragg [Wed, 28 Jan 2009 14:09:51 +0000 (14:09 +0000)]
Another Cogl gl vs gles normalizaion pass
This tries to make a number of files more comparable with the intention of
moving some code into cogl/common/
Files normalized:
cogl.c
cogl-context.c
cogl-context.h
cogl-texture.c
Robert Bragg [Tue, 27 Jan 2009 11:07:22 +0000 (11:07 +0000)]
Removes cogl_color_set_from_4d as it may mislead people.
Someone not sure which cogl_color_set_from_* version is "best" may use
set_from_4d because taking doubles implies higher precision. Currently
it doesn't have any advantage.
Robert Bragg [Wed, 28 Jan 2009 14:47:03 +0000 (14:47 +0000)]
Changes cogl_rectangle to take x1, y1, x2, y2 args not x1, y1, width, height
This makes it consistent with cogl_rectangle_with_{multi,}texture_coords.
Notably the reason cogl_rectangle_with_{multi,}texture_coords wasn't changed
instead is that the former approach lets you describe back facing rectangles.
(though technically you could pass negative width/height values to achieve
this; it doesn't seem as neat.)
Robert Bragg [Wed, 28 Jan 2009 13:46:39 +0000 (13:46 +0000)]
Adds some debug code to _cogl_journal_flush_quad_batch
The code is #if 0 guarded, but when uncommented it outlines all drawn
rectangles with an un-blended red, green or blue border. This may e.g. help
with debugging texture slicing issues or blending issues, plus it looks quite
cool.
Emmanuele Bassi [Wed, 28 Jan 2009 16:44:22 +0000 (16:44 +0000)]
[clutter-docs] Update the animation tutorial
The Alpha API and usage has been changed by the recent overhaul
of the ClutterAlpha class; hence, we need to update the relative
documentation in the animation tutorial.
Emmanuele Bassi [Wed, 28 Jan 2009 16:43:05 +0000 (16:43 +0000)]
[cogl-docs] Add the Materials section
The COGL Materials API was not linked from the COGL reference
index.
Emmanuele Bassi [Wed, 28 Jan 2009 15:19:24 +0000 (15:19 +0000)]
Update the pkg-config requires list
Clutter depends on various libraries, some of them backend-specific
like the X11 libraries.
Whenever possible, we should add those requirements to the pkg-config
file. For this reason, we have a variable inside the configure.ac
template file which should be filled with the backend-specific modules
we check for during configure time, and then added to the standard
list of dependencies that we write inside the clutter.pc file.
Neil Roberts [Wed, 28 Jan 2009 16:24:02 +0000 (16:24 +0000)]
Undeprecate clutter_actor_set_scale_with_gravity
The scale center has returned so this function is available again but
it was still deprecated so you couldn't use it.
Neil Roberts [Wed, 28 Jan 2009 09:08:19 +0000 (09:08 +0000)]
Merge branch 'scale-center'
Bug 1349 - Using the anchor point to set the scale center is messy
The branch adds an extra center point for scaling which can be used
for example to set a scale about the center without affecting the
position of the actor.
The scale center can be specified as a unit offset from the origin or
as a gravity. If specified as a gravity it will be stored as a
fraction of the actor's size so that the position will track when the
actor changes size.
The anchor point and rotation centers have been modified so they can
be set with a gravity in the same way. However, only the Z rotation
exposes a property to set using a gravity because the other two
require a Z coordinate which doesn't make sense to interpret as a
fraction of the actor's width or height.
Conflicts:
clutter/clutter-actor.c
Neil Roberts [Wed, 28 Jan 2009 15:25:38 +0000 (15:25 +0000)]
[clutter-actor] Use G_STMT_START/END instead of do { } while (0)
In the TRANSFORM_ABOUT_ANCHOR_COORD macro it now uses G_STMT_START and
G_STMT_END instead of directly using do/while because it's more
readable.
Emmanuele Bassi [Wed, 28 Jan 2009 14:36:45 +0000 (14:36 +0000)]
Update NEWS file
Emmanuele Bassi [Wed, 28 Jan 2009 14:07:23 +0000 (14:07 +0000)]
Update the release notes for 1.0
Add items about the ClutterBehaviourBspline and ClutterEffect
API removals.
Neil Roberts [Wed, 28 Jan 2009 12:57:06 +0000 (12:57 +0000)]
[cogl-texture] Fix order of tex coords when compensating for waste
When drawing a texture with waste in _cogl_multitexture_unsliced_quad
it scales the texture coordinates so that the waste is not
included. However the formula was the wrong way around so it was
calculating as if the texture coordinates are ordered x1,x2,y1,y2 but
it is actually x1,y1,x2,y2.
Neil Roberts [Wed, 28 Jan 2009 12:06:39 +0000 (12:06 +0000)]
[text-backface-culling] Fix width/height parameters to cogl_rectangle
During the upgrade to cogl material, test-backface-culling was
switched to use cogl_rectangle instead of cogl_texture_rectangle to
draw the textures. However, cogl_rectangle takes a width and height
instead of the the top-left and bottom-right vertices so the
rectangles were being drawn in the wrong place.
Neil Roberts [Wed, 28 Jan 2009 12:00:01 +0000 (12:00 +0000)]
[cogl-texture] Reset size of vertex log after drawing a polygon
Otherwise trying to render a rectangle after a polygon doesn't work
because it expects the array to be empty when it starts logging
vertices.
Neil Roberts [Wed, 28 Jan 2009 11:29:49 +0000 (11:29 +0000)]
Fix rectangles_with_multitexture_coords for sliced without tex coords
When the texture is sliced it drops back to a fallback function and
passes it the texture coordinates from the rectangle. However if no
tex coords are given it would crash. Now it passes the default
0.0->1.0 tex coords instead.
Neil Roberts [Wed, 28 Jan 2009 11:09:47 +0000 (11:09 +0000)]
Fix _cogl_texture_unsliced_quad when no texture coordinates are given
If no texture coordinates are given then texture_unsliced_quad tries
to generate its own coordinates. However it also tries to read the
texture coordinates to check if they are in [0.0,1.0] range so it will
crash before it reaches that.
Emmanuele Bassi [Wed, 28 Jan 2009 11:56:12 +0000 (11:56 +0000)]
Reuse the layers list
Instead of getting the layers list twice from the Material, we
can reuse the list when we need to retrieve the first layer.
Emmanuele Bassi [Wed, 28 Jan 2009 11:55:19 +0000 (11:55 +0000)]
Remove gtk-doc annotation
The _cogl_material_flush_layers_gl_state() function is static,
so it should not have a gtk-doc annotation.
Emmanuele Bassi [Tue, 27 Jan 2009 20:06:58 +0000 (20:06 +0000)]
Fix typo in the :clone getter method
The :clone property getter method, clutter_clone_get_source(), was
defined using the wrong name of clutter_clone_get_clone_source().
Emmanuele Bassi [Tue, 27 Jan 2009 17:44:49 +0000 (17:44 +0000)]
Update the release notes for 1.0
Add entries for the removal of:
- ClutterLabel
- ClutterEntry
- ClutterCloneTexture
Neil Roberts [Wed, 28 Jan 2009 10:52:55 +0000 (10:52 +0000)]
Fix building GLES after _cogl_texture_handle_from_pointer got removed
Commit
a688b1db removed the function and replaced it with a direct
cast. This was also being used in the GL ES so the build broke.
Neil Roberts [Tue, 27 Jan 2009 16:55:25 +0000 (16:55 +0000)]
Directly set backend font options in clutter_set_font_flags
Instead of having a separate set of font options that override the
backend options when clutter_set_font_flags is called, it now just
directly sets the backend font options. So now the font flags are just
a convenience wrapper around the backend font options.
This also makes the ClutterText labels automatically update when the
font flags are changed because they will respond to the 'font-changed'
signal from the backend.
Neil Roberts [Tue, 27 Jan 2009 16:47:20 +0000 (16:47 +0000)]
Listen for the font-changed signal on the backend in ClutterText
Whenever a ClutterText is created it now connects to the font-changed
signal. When it is emitted the layout cache is dirtied and a relayout
is queued. That way changes to the font options or resolution will
cause an immediate update to the labels in the scene.
Emmanuele Bassi [Tue, 27 Jan 2009 16:53:01 +0000 (16:53 +0000)]
[docs] Documentation fixes
Update the COGL API reference to avoid a lot of warnings coming
from gtk-doc.
Emmanuele Bassi [Tue, 27 Jan 2009 16:41:51 +0000 (16:41 +0000)]
[docs] Update Clutter API reference symbols
Add the new symbols from the ClutterClone and COGL material API
to the API reference.
Emmanuele Bassi [Tue, 27 Jan 2009 16:40:51 +0000 (16:40 +0000)]
Removed unused conditional
USE_COGL_MATERIAL is a left-over from the development branch.
Emmanuele Bassi [Tue, 27 Jan 2009 16:12:30 +0000 (16:12 +0000)]
Merge branch 'generic-actor-clone'
* generic-actor-clone:
Remove CloneTexture from the API
[tests] Clean up the Clone interactive test
Rename ActorClone to Clone/2
Rename ActorClone to Clone/1
Improves the unit test to verify more awkward scaling and some corresponding fixes
Implements a generic ClutterActorClone that doesn't need fbos.
Emmanuele Bassi [Tue, 27 Jan 2009 16:02:04 +0000 (16:02 +0000)]
Fallout from cogl-material merge
When enabling the maintainer CFLAGS the compiler got very angry
at the code that has been merged.
Robert Bragg [Tue, 27 Jan 2009 11:01:23 +0000 (11:01 +0000)]
Adds padding to CoglColor to future proof it a bit
This adds enough padding to allow us to change to an internal float storage
for the color components if needs be in the future.
Robert Bragg [Mon, 26 Jan 2009 22:52:38 +0000 (22:52 +0000)]
Support scaling on the z axis with cogl_scale
This simply adds a z argument to cogl_scale and updates clutter-actor.c
to pass 1.0 for the z scale.
Robert Bragg [Tue, 27 Jan 2009 15:19:34 +0000 (15:19 +0000)]
Merge branch 'cogl-material'
Conflicts:
clutter/cogl/gl/cogl-texture.c
clutter/cogl/gles/cogl-primitives.c
* cogl-material:
clutter-{clone-,}texture weren't updating their material opacity.
Updates GLES1 support for CoglMaterial
Normalizes gl vs gles code in preperation for synching material changes
Removes cogl_blend_func and cogl_alpha_func
Fully integrates CoglMaterial throughout the rest of Cogl
[cogl-material] Restore the GL_TEXTURE_ENV_MODE after material_rectangle
[cogl-material] Make the user_tex_coords parameter of _rectangle const
[test-cogl-material] Remove return value from material_rectangle_paint
Add cogl-material.h and cogl-matrix.h to libclutterinclude_HEADERS
[cogl-material] improvements for cogl_material_rectangle
[cogl-material] Adds a cogl_material_set_color function
[cogl-material] Some improvements for how we sync CoglMaterial state with OpenGL
[cogl-material] Converts clutter-texture/clutter-clone-texture to the material API
[doc] Hooks up cogl-material reference documentation
Updates previous GLES multi-texturing code to use CoglMaterial
Adds a CoglMaterial abstraction, which includes support for multi-texturing
[doc] Hooks up cogl-matrix reference documentation
Adds CoglMatrix utility code
[tests] Adds an interactive unit test for multi-texturing
[multi-texturing] This adds a new cogl_multi_texture API for GL,GLES1 + GLES2
Emmanuele Bassi [Tue, 27 Jan 2009 15:18:45 +0000 (15:18 +0000)]
Remove CloneTexture from the API
ClutterClone supercedes ClutterCloneTexture, since it can clone
every kind of actor -- including composite ones.
This is another "brain surgery with a shotgun" kind of commit: it
removes CloneTexture and updates every test case using CloneTexture
to ClutterClone. The API fallout is minimal, luckily for us.
Robert Bragg [Tue, 27 Jan 2009 15:17:16 +0000 (15:17 +0000)]
Removes test-simple from tests/interactive/Makefile.am
The addition was accidental