Damien Lespiau [Mon, 3 Aug 2009 12:58:21 +0000 (13:58 +0100)]
[gitignore] Ignore new test-color-hls-roundtrip test
Emmanuele Bassi [Sun, 2 Aug 2009 17:34:17 +0000 (18:34 +0100)]
[actor] Use the right vertex
The vertex that should be used by the apply_relative_transform
is the one passed in as const, and the result should be placed
inside the non-const ClutterVertext. Currently, we are using
the latter, and thus the function is completely useless.
Emmanuele Bassi [Fri, 31 Jul 2009 09:29:33 +0000 (10:29 +0100)]
[x11] Force a redraw before mapping the stage
Does as it says on the tin: run a paint cycle before calling
XMapWindow().
Joshua Lock [Fri, 31 Jul 2009 09:16:56 +0000 (10:16 +0100)]
[docs] Update building instructions for OS X
Recommend OS X users install the dependencies using MacPorts and build
Clutter themselves.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Neil Roberts [Wed, 29 Jul 2009 18:06:36 +0000 (19:06 +0100)]
[mingw] Update the README
The README has been updated to say that you can use the script under
MSYS and also to contain a pointer to OAH. It also contains the
updated contents of a blog post¹ about building with MSYS.
1. http://www.busydoingnothing.co.uk/blog/2008/07/13#ClutterWin32
Neil Roberts [Wed, 29 Jul 2009 17:13:19 +0000 (18:13 +0100)]
[mingw-cross-compile.sh] Fix to use git rather than svn
The script includes a part to automatically checkout the Clutter
source and build it but it was using the old svn repo instead of git.
Neil Roberts [Wed, 29 Jul 2009 16:59:54 +0000 (17:59 +0100)]
[mingw-cross-compile.sh] Add a note about MSYS in the comment
The comment previously implied that you could only use the script to
cross compile but it works just as well under MSYS.
Neil Roberts [Wed, 29 Jul 2009 16:58:02 +0000 (17:58 +0100)]
[mingw-cross-compile.sh] Update version numbers of all the dependencies
This updates the URLs for the binary dependencies to use the latest
versions.
Emmanuele Bassi [Wed, 29 Jul 2009 16:22:18 +0000 (17:22 +0100)]
[docs] Remove mentions of Clutter-Cairo
The mingw README file still mentions Clutter-Cairo as a known issue.
Emmanuele Bassi [Wed, 29 Jul 2009 16:21:13 +0000 (17:21 +0100)]
[mingw/win32] Remove clutter-cairo
The Clutter-Cairo library has been removed, so there's no point
in checking it out -- from Subversion, even.
Emmanuele Bassi [Tue, 28 Jul 2009 17:39:24 +0000 (18:39 +0100)]
Post-release bump to 1.0.1
Emmanuele Bassi [Tue, 28 Jul 2009 12:23:26 +0000 (13:23 +0100)]
[release] 1.0.0
Emmanuele Bassi [Tue, 28 Jul 2009 11:20:07 +0000 (12:20 +0100)]
Update the NEWS
Emmanuele Bassi [Tue, 28 Jul 2009 12:57:07 +0000 (13:57 +0100)]
Fix compiler warnings when COGL debug level=minimum
Emmanuele Bassi [Tue, 28 Jul 2009 11:19:44 +0000 (12:19 +0100)]
[docs] Point the TODO to Bugzilla
Emmanuele Bassi [Tue, 28 Jul 2009 11:19:26 +0000 (12:19 +0100)]
[docs] Update requirements and release notes
Emmanuele Bassi [Tue, 28 Jul 2009 12:43:52 +0000 (13:43 +0100)]
[units] Add binding-friendly initializers
We should follow the convention for boxed types initializers of:
<type_name>_from_<another_type> (boxed, value)
For ClutterUnits as well; so:
clutter_units_pixels -> clutter_units_from_pixels
clutter_units_em -> clutter_units_from_em
...
We should still keep the short-hand version as a macro, though.
Emmanuele Bassi [Tue, 28 Jul 2009 12:20:32 +0000 (13:20 +0100)]
[animation] Fix variable use
Instead of using the proper typed variables we were overwriting
the gpointer for the Interval's final value.
Neil Roberts [Tue, 28 Jul 2009 11:03:55 +0000 (12:03 +0100)]
[win32] Remove the call to clutter_redraw in clutter_stage_win32_show
Since commit
7b811f8b this is done in clutter_stage_show so there is
no need for it in the backends.
Neil Roberts [Tue, 28 Jul 2009 11:00:49 +0000 (12:00 +0100)]
[win32] Move the show/hide to be implementations of the interface
This makes clutter_stage_win32_show/hide be implementations of
ClutterStageWindowIface rather than overriding the methods in
ClutterActor. This reflects the changes in
e4ff24bc for the X11
backend.
Neil Roberts [Tue, 28 Jul 2009 10:58:34 +0000 (11:58 +0100)]
[build/mingw] Update Cairo version to 1.8.6 in mingw-cross-compile.sh
The Pango 1.22 binaries require Cairo 1.8.0 to get
cairo_show_text_glyphs.
Ole André Vadla Ravnås [Tue, 7 Jul 2009 18:02:25 +0000 (20:02 +0200)]
Avoid near/far identifier names.
Leads to conflict with system headers on Windows, where macros named
"near" and "far" are defined.
Ole André Vadla Ravnås [Wed, 1 Jul 2009 14:29:12 +0000 (16:29 +0200)]
Remove unused variable to fix compiler warning.
Ole André Vadla Ravnås [Wed, 1 Jul 2009 14:27:11 +0000 (16:27 +0200)]
Call glClientActiveTexture() through COGL context.
Fixes build issues on systems with OpenGL header older than 1.3.
Ole André Vadla Ravnås [Tue, 16 Jun 2009 20:29:21 +0000 (22:29 +0200)]
Avoid C99 to fix compilation with compilers like MSVC.
Ole André Vadla Ravnås [Mon, 18 May 2009 15:30:36 +0000 (17:30 +0200)]
Initialize pixel data before glReadPixels().
Haakon Sporsheim [Tue, 31 Mar 2009 12:45:45 +0000 (14:45 +0200)]
Reposition variable declarations to avoid C99.
Haakon Sporsheim [Tue, 31 Mar 2009 12:44:46 +0000 (14:44 +0200)]
Add MSVC preprocessor guards in test-clutter-cairo-flowers.c
Haakon Sporsheim [Tue, 31 Mar 2009 12:43:12 +0000 (14:43 +0200)]
Add white_color a variable on the stack.
Haakon Sporsheim [Tue, 31 Mar 2009 12:41:44 +0000 (14:41 +0200)]
Add int dummy; to empty struct TestConformSimpleFixture definition.
Haakon Sporsheim [Tue, 31 Mar 2009 12:39:46 +0000 (14:39 +0200)]
Remove config.h inclusion.
Haakon Sporsheim [Tue, 31 Mar 2009 12:37:07 +0000 (14:37 +0200)]
Reposition variable declarations to avoid C99.
Neil Roberts [Tue, 28 Jul 2009 09:39:18 +0000 (10:39 +0100)]
Remove the MSVC build files
These are hopelessly out of date so they just cause more trouble than
they're worth.
Anyone interested in building with MSVC would be better off starting
from the build files available as part of the OAH project which is
located here:
https://launchpad.net/oah
Emmanuele Bassi [Tue, 28 Jul 2009 10:25:11 +0000 (11:25 +0100)]
[animation] Force the final state inside ::completed
In case we are skipping too many frames, we should force the animation
instance to apply the final state of the animated interval inside the
::completed signal handler.
Emmanuele Bassi [Mon, 27 Jul 2009 16:24:35 +0000 (17:24 +0100)]
[build] Generate ChangeLog from the Git import
Emmanuele Bassi [Mon, 27 Jul 2009 15:51:14 +0000 (16:51 +0100)]
[build] Use API_VERSION, not MAJORMINOR
The correct macro for Clutter's API version is CLUTTER_API_VERSION,
not CLUTTER_MAJORMINOR anymore.
Emmanuele Bassi [Mon, 27 Jul 2009 15:10:07 +0000 (16:10 +0100)]
Remove explicit size of the Vertex arrays
The Vertex arrays passed to some ClutterActor methods should not
have the size. Albeit being technically correct, it's not a good
practice.
Emmanuele Bassi [Mon, 27 Jul 2009 14:42:31 +0000 (15:42 +0100)]
[stage] Add a warning for :offscreen usage
The Stage:offscreen property hasn't been tested for ages, and it
should really just use a FBO, not indirect rendering on a X Pixmap
only on X11. There are better ways anyway to get the current
contents of ClutterStage as a buffer anyway.
We might remove it at any later date, or actually make it work
properly.
Emmanuele Bassi [Mon, 27 Jul 2009 14:08:03 +0000 (15:08 +0100)]
[glx] Explicitly set the depth size for GLX visuals
When requesting a GLX visual from the X server we should explicitly
set the GL_DEPTH_SIZE and the GL_ALPHA_SIZE bits, otherwise some
functionality might just not work, or work unreliably.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1723
Emmanuele Bassi [Mon, 27 Jul 2009 14:01:52 +0000 (15:01 +0100)]
Convert gint to GLints in the Shader types wrapper
The GValue wrappers for ClutterShader types should always store
values using GL types (GLfloat, GLint) internally, but give and
take generic C types (float, int) to the Clutter side.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1359
Emmanuele Bassi [Mon, 27 Jul 2009 11:04:40 +0000 (12:04 +0100)]
[color] Fix HLS to RGB colorspace conversion
The HLS to RGB conversion in case the S value is zero is:
R = G = B = luminance
ClutterColor uses a byte (0 to 255) for the R, G and B channels
encoding, while luminance is expressed using a floating point value
in the closed interval [0, 1]; thus the case above becomes:
R = G = B = (luminance * 255)
The clutter_color_from_hls() code is missing the final step of
de-normalizing the luminance value, and so it breaks the roundtrip
colorspace conversion between RGB and HLS.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1695
Emmanuele Bassi [Mon, 27 Jul 2009 10:46:26 +0000 (11:46 +0100)]
[tests] Add RGB<->HLS roundtrip test unit
The ClutterColor conformance test should have a unit for verifying
the RGB<->HLS conversion code, especially the ability to roundtrip
between the two colorspaces.
Owen W. Taylor [Wed, 22 Jul 2009 19:38:44 +0000 (15:38 -0400)]
Always create the Damage object for ClutterX11TexturePixmap auto updates
If clutter_x11_texture_set_window() was called after
clutter_x11_texture_pixmap_set_automatic(), then the Damage object would
not be properly created so updates to the window were ignored.
Refactor creation of the damage object to a separate function, and
call it from clutter_x11_texture_set_window() and clutter_x11_texture_set_pixmap()
as appropriate. Addition and removal of the filter function is made
conditional on priv->damage to make free_damage_resources() cleanly
idempotent.
See: http://bugzilla.gnome.org/show_bug.cgi?id=587189 for the original
bug report.
http://bugzilla.openedhand.com/show_bug.cgi?id=1710
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Michael Mortensen [Sun, 26 Jul 2009 19:13:36 +0000 (20:13 +0100)]
[osx] Update events to floating point coordinates
The event translation code should be using the float type for
coordinates.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1725
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Sun, 26 Jul 2009 19:10:42 +0000 (20:10 +0100)]
[osx] Implement StageWindow::show/::hide
Instead of using the Actor class ::show and ::hide virtual function,
use the StageWindow interface API.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1724
Emmanuele Bassi [Thu, 23 Jul 2009 18:04:27 +0000 (19:04 +0100)]
[text] Allow key navigation by word
When pressing Ctrl with the left and right arrow keys we should
skip to (or select until) the previous and next word, respectively.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1713
Geoff Gustafson [Thu, 23 Jul 2009 17:21:10 +0000 (18:21 +0100)]
[text] Queue a redraw when the selection is cleared
If you select all the text in a ClutterText, there is an invisible
cursor position either at the beginning or end. If it's at the beginning,
the bug is that left arrow won't clear the selection. If it's at the end,
the bug is that the right arrow won't.
Here are the ways to reproduce it:
a. Ctrl-A selects all and moves the hidden cursor position to the left.
b. For single line: End, Shift-Home does the same.
c. Or manually moving to the end and doing Shift-Left Arrow to the
beginning.
These all put it in the state where right arrow will properly clear
selection and move to cursor position 1, but left arrow fails to clear
the selection.
For b and c above, the opposite will give you the end case where right
arrow doesn't work.
Anyway, it turns out clear_selection is getting called, it just doesn't
show up because it's not doing a queue_redraw. So the attached patch
seems to fix things.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Tue, 21 Jul 2009 15:35:50 +0000 (16:35 +0100)]
[docs] Fix wrong XML elements
Emmanuele Bassi [Tue, 21 Jul 2009 13:13:31 +0000 (14:13 +0100)]
[docs] Update the Actor subclassing documentation
Mention map/unmap and fix the examples code.
Update the Container virtual functions.
Emmanuele Bassi [Tue, 21 Jul 2009 13:11:28 +0000 (14:11 +0100)]
[build] Use per-target flags and libraries
AM_LDFLAGS is ignored by the LDFLAGS target, and it's also not the right
place to put the libraries used by the linker.
Thanks to Vincent Untz for spotting this.
Emmanuele Bassi [Tue, 21 Jul 2009 10:51:20 +0000 (11:51 +0100)]
[docs] Update the "creating new behaviours" chapter
The signature of the ::alpha_notify virtual function has been
changed with the switch to float ClutterAlpha.
Emmanuele Bassi [Tue, 21 Jul 2009 10:50:08 +0000 (11:50 +0100)]
[docs] Update the building instructions
New configure script command line switches have been added since
the last time we updated the documentation.
Emmanuele Bassi [Tue, 21 Jul 2009 10:29:52 +0000 (11:29 +0100)]
[docs] Update the animations tutorial
Bring the Animation framework introduction/tutorial up to the 1.0
API for timelines and animations.
Emmanuele Bassi [Tue, 21 Jul 2009 08:22:34 +0000 (09:22 +0100)]
Fix copy-and-paste errors in the deprecation macros
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1704
Emmanuele Bassi [Tue, 21 Jul 2009 08:20:09 +0000 (09:20 +0100)]
[docs] Fix typo in the effects migration guide
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1706
Emmanuele Bassi [Mon, 20 Jul 2009 19:59:18 +0000 (20:59 +0100)]
[docs] Improve the Units to and from string conversion
Make sure to document the conversion to and from strings for ClutterUnits,
with negative examples and with the behaviour for fractionary bits.
Emmanuele Bassi [Mon, 20 Jul 2009 11:49:35 +0000 (12:49 +0100)]
[doc] Miscellaneous documentation fixes
Remove private symbols, and add missing public ones.
Emmanuele Bassi [Mon, 20 Jul 2009 11:47:53 +0000 (12:47 +0100)]
[cogl] Make the blend string error domain public
The error domain and codes must present in a publicly installed header
otherwise they won't be usable to match a GError.
Emmanuele Bassi [Mon, 20 Jul 2009 10:45:47 +0000 (11:45 +0100)]
[gitignore] Add test-materials
Emmanuele Bassi [Tue, 14 Jul 2009 12:47:35 +0000 (13:47 +0100)]
Allow disabling motion event throttling
It might be desirable for some applications and/or platforms to get
every motion event that was delivered to Clutter from the windowing
backend. By adding a per-stage flag we can bypass the throttling
done when processing the events.
http://bugzilla.openedhand.com/show_bug.cgi?id=1665
Emmanuele Bassi [Sat, 18 Jul 2009 18:40:29 +0000 (19:40 +0100)]
[docs] Move the releasing process to a separate file
The documentation on how to release Clutter should be in a separate
file from the documentation on how to hack on Clutter.
Robert Bragg [Sun, 19 Jul 2009 09:08:32 +0000 (10:08 +0100)]
[doc] Remove references to cogl_vertex_buffer_delete_indices
These referencese were left over from before indices got CoglHandles to
uniquely identify them. cogl_handle_unref can be used to delete indices
now.
Emmanuele Bassi [Sat, 18 Jul 2009 15:59:54 +0000 (16:59 +0100)]
[cogl/gles] Fix missing symbols in CoglContext
Keep the CoglContext in sync between GL and GLES backends. We ought
to find a way to have a generic context, though, and have backend
specific sections.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1698
Owen W. Taylor [Fri, 17 Jul 2009 19:15:03 +0000 (15:15 -0400)]
Fix parallel build of introspection
We need to explicitly force order so that ClutterJson.gir and Cogl.gir
are present in the parent directory before we try to build Clutter.typelib.
http://bugzilla.openedhand.com/show_bug.cgi?id=1700
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Owen W. Taylor [Fri, 17 Jul 2009 19:10:06 +0000 (15:10 -0400)]
Fix building introspection when dolt is not in use
On some platforms (anything but Linux, and on obscure Linux
architectures) dolt isn't used, so $(top_builddir)/doltlibtool
won't exist. $(top_builddir)/libtool will always be generated
even if dolt is used, so just use that unconditionally. We don't
need the extra speed when linking the single program for
introspection.
http://bugzilla.openedhand.com/show_bug.cgi?id=1699
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Fri, 17 Jul 2009 16:51:26 +0000 (17:51 +0100)]
Post-release bump to 0.9.9
Emmanuele Bassi [Fri, 17 Jul 2009 16:32:45 +0000 (17:32 +0100)]
[release] 0.9.8
Emmanuele Bassi [Fri, 17 Jul 2009 16:32:20 +0000 (17:32 +0100)]
Update NEWS file
Emmanuele Bassi [Mon, 13 Jul 2009 16:27:01 +0000 (17:27 +0100)]
Fix comments inside configure.ac
Neil Roberts [Fri, 17 Jul 2009 11:43:52 +0000 (12:43 +0100)]
[stage] Force an allocation before showing the stage
A lot of applications change the size of the stage from the default
before the stage is initially shown. The size change won't take affect
until the first allocation run. However we want the window to be at
the correct size when we first map it so we should force an allocation
run before showing the stage.
There was an explicit call to XResizeWindow in
clutter_stage_x11_show. This is not needed anymore because
XResizeWindow will already have been called by the allocate method.
Marcos [Mon, 13 Jul 2009 16:04:05 +0000 (17:04 +0100)]
[win32] Compilation fixes
Remove the usage of the old CLUTTER_UNITS_* macros and put back a
missing ';'.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 13 Jul 2009 15:56:47 +0000 (16:56 +0100)]
[osx] Enable motion event dispatch
By default NSWindow does not listen to mousemoved events and hence the
default behaviour for Actors using the "motion-event" signal differs
from backend to backend.
Using setAcceptsMouseMovedEvents seems to fix it; unfortunately, I
cannot verify it, but since nobody is currently working on the Quartz
backend I guess it cannot get more broken than how currently is.
Thanks to: Michael <michael@f3k.org>
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1687
Emmanuele Bassi [Mon, 13 Jul 2009 15:53:06 +0000 (16:53 +0100)]
[osx] Remove old units macros
Remove the usage of CLUTTER_UNITS_* macros and at least get the
chance to make the OSX backend compile.
Hopefully, since I can't currently test it.
Emmanuele Bassi [Mon, 13 Jul 2009 15:18:27 +0000 (16:18 +0100)]
[actor] Allow querying whether we are painted by a Clone
It would be useful inside a custom actor's paint function to be able to
tell if this is a primary paint call, or if we are in fact painting on
behalf of a clone.
In Mutter we have an optimization not to paint occluded windows; this is
desirable for the windows per se, to conserve bandwith to the card, but
if something like an application switcher is using clones of these windows,
they will not get painted either; currently we have no way of
differentiating between the two.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1685
Emmanuele Bassi [Mon, 13 Jul 2009 15:16:38 +0000 (16:16 +0100)]
Remove unused TEXTURE_IN_CLONE_PAINT private flag
The CLUTTER_TEXTURE_IN_CLONE_PAINT was used with the old CloneTexture
actor; now that we have ClutterClone nothing sets the private flag
anymore, and the flag itself is not needed.
Xu Li [Mon, 13 Jul 2009 08:06:13 +0000 (16:06 +0800)]
[x11] update_wm_hints after unsetting WITHDRAWN
Updating the WM hints on the stage window shortcircuits if the stage
is in WITHDRAWN state, so we need to move the update_wm_hints() call
after the flag has been unset.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 13 Jul 2009 14:31:38 +0000 (15:31 +0100)]
[glx] Make the wait_for_vblank function private
Nobody should be using the function to wait for the vblank outside
of the GLX backend.
Owen W. Taylor [Sat, 6 Jun 2009 19:47:57 +0000 (15:47 -0400)]
Call glFinish() before manually waiting for VBLANK
If we manually wait for the VBLANK with:
- SGI_video_sync
- Direct usage of the DRM ioctl
Then we should call glFinish() first, or otherwise the swap-buffers
may be delayed by pending drawing and cause a tear.
http://bugzilla.openedhand.com/show_bug.cgi?id=1636
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Sun, 12 Jul 2009 00:43:41 +0000 (01:43 +0100)]
[tests] Remove test-perspective
The perspective test was used essentially to determine whether the
perspective set up in COGL worked correctly. The perspective code
has been changed a lot since Clutter 0.3: we rely on client-side
matrices and we use floating point; so, all the conditions the test
was supposed to verify do not exist anymore.
Evan Martin [Sun, 12 Jul 2009 00:38:40 +0000 (01:38 +0100)]
[docs] Fix typos and remove mentions of SVN
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Jakub Higersberger [Fri, 3 Jul 2009 12:51:17 +0000 (14:51 +0200)]
Use correct signal detail
The Animation should connect to the notify::alpha signal, not to
the non-existing notify::value signal.
Fixes bugs:
http://bugzilla.openedhand.com/show_bug.cgi?id=1674
http://bugzilla.openedhand.com/show_bug.cgi?id=1688
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Sun, 12 Jul 2009 00:27:31 +0000 (01:27 +0100)]
Small code clean up
Make ClutterTexture slightly more similar to the rest of the code base.
Robert Bragg [Tue, 7 Jul 2009 15:16:56 +0000 (16:16 +0100)]
[cogl] Fix more brokeness with _cogl_material_equal
commit
e2c4a2a9f83 fixed one thing but broke many others things :-/
hopfully this fixes that.
It turned out that the journal was mistakenly setting the OVERRIDE_LAYER0
flush option for all entries, but some other logic errors were also
uncovered in _cogl_material_equal.
pippin [Thu, 9 Jul 2009 19:45:08 +0000 (15:45 -0400)]
serialize upload of asyncronously loaded textures
Rate limit the uploading of textures to stop if it uses more than 5ms
during one master clock iteration.
Robert Bragg [Thu, 9 Jul 2009 19:03:01 +0000 (20:03 +0100)]
ensure next iteration
Added an internal clutter function, _clutter_master_clock_ensure_next_iteration
that ensures another iteration of the master clock, can be called from repaint
functions as well as other threads.
Robert Bragg [Fri, 3 Jul 2009 23:15:49 +0000 (00:15 +0100)]
[cogl] Fix drawing with sliced textures using material layer0 overrides
To help us handle sliced textures; When flushing materials there is an
override option that can be given to replace the texture name for layer0
so we may iterate the slices without needing to modify the material
in use.
Since improving the journal's ability to batch state changes we added a
_cogl_material_equals function that is used by the journal to compare
materials and identify when a state change is required, but this wasn't
correctly considering the layer0 override resulting in false positives that
meant the journal wouldn't update the GL state and the first texture name
was used for all slices.
Robert Bragg [Thu, 2 Jul 2009 23:34:10 +0000 (00:34 +0100)]
[cogl matrix stack] Create a client side matrix stack for the projection matrix
The cost of glGetFloatv with Mesa is still representing a majority of our
time in OpenGL for some applications, and the last thing left using this is
the current-matrix API when getting the projection matrix.
This adds a matrix stack for the projection matrix, so all getting, setting
and modification of the projection matrix is now managed by Cogl and it's only
when we come to draw that we flush changes to the matrix to OpenGL.
This also brings us closer to being able to drop internal use of the
deprecated OpenGL matrix functions, re: commit
54159f5a1d02
Emmanuele Bassi [Thu, 2 Jul 2009 13:21:16 +0000 (14:21 +0100)]
Add more (allow-none) annotations
Colin Walters [Thu, 2 Jul 2009 12:15:42 +0000 (13:15 +0100)]
Use the (allow-none) annotation for clutter_init*
We accept NULL for some parameters in the initialization functions.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Wed, 1 Jul 2009 14:59:13 +0000 (15:59 +0100)]
Post-release bump to 0.9.7
Emmanuele Bassi [Wed, 1 Jul 2009 14:28:33 +0000 (15:28 +0100)]
[release] 0.9.6
Emmanuele Bassi [Wed, 1 Jul 2009 13:56:13 +0000 (14:56 +0100)]
[docs] Update the NEWS and README files
Emmanuele Bassi [Wed, 1 Jul 2009 14:15:52 +0000 (15:15 +0100)]
[actor] Remove the unused get_allocation_coords()
The clutter_actor_get_allocation_coords() is not used, and since
the switch to floats in the Actor's API, it returns exactly what
the get_allocation_box() returns.
Emmanuele Bassi [Wed, 1 Jul 2009 12:59:13 +0000 (13:59 +0100)]
[actor] Allow changing the transformations matrix
Currently, the transformation matrix for an actor is constructed
from scenegraph-related accessors. An actor, though, can call COGL
API to add new transformations inside the paint() implementation,
for instance:
static void
my_foo_paint (ClutterActor *a)
{
...
cogl_translate (-scroll_x, -scroll_y, 0);
...
}
Unfortunately these transformations will be completely ignored by
the scenegraph machinery; for instance, getting the actor-relative
coordinates from event coordinates is going to break badly because
of this.
In order to make the scenegraph aware of the potential of additional
transformations, we need a ::apply_transform() virtual function. This
vfunc will pass a CoglMatrix which can be used to apply additional
operations:
static void
my_foo_apply_transform (ClutterActor *a, CoglMatrix *m)
{
CLUTTER_ACTOR_CLASS (my_foo_parent_class)->apply_transform (a, m);
...
cogl_matrix_translate (m, -scroll_x, -scroll_y, 0);
...
}
The ::paint() implementation will be called with the actor already
using the newly applied transformation matrix, as expected:
static void
my_foo_paint (ClutterActor *a)
{
...
}
The ::apply_transform() implementations *must* chain up, so that the
various transformations of each class are preserved. The default
implementation inside ClutterActor applies all the transformations
defined by the scenegraph-related accessors.
Actors performing transformations inside the paint() function will
continue to work as previously.
Emmanuele Bassi [Wed, 1 Jul 2009 11:34:54 +0000 (12:34 +0100)]
Split the typdef to avoid confusing scanners
Scanners like gtk-doc and g-ir-scanner get confused by:
typedef struct _Foo {
...
} Foo;
And expect instead:
typedef struct _Foo Foo;
struct _Foo {
...
};
CoglMatrix definition should be changed to avoid the former type.
Emmanuele Bassi [Thu, 25 Jun 2009 13:41:25 +0000 (14:41 +0100)]
[x11] Fix the race between resize and glViewport calls
The race we were experiencing in the X11 backends is apparently
back after the fix in commit
00a3c698.
This time, just delaying the setting of the SYNC_MATRICES flag
is not enough, so we can resume the use of a STAGE_IN_RESIZE
private flag.
This should also fix bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1668
Emmanuele Bassi [Thu, 25 Jun 2009 13:39:57 +0000 (14:39 +0100)]
Add debug notes for calls to glViewport()
In order to validate the sequence of:
XResizeWindow
ConfigureNotify
glViewport
that should happen on X11 we need to add debug annotations to the
calls to glViewport() done through COGL.
Robert Bragg [Wed, 1 Jul 2009 11:57:30 +0000 (12:57 +0100)]
[cogl] cache the viewport width and height
This avoids some calls to glGetFloatv, which have at least proven to be very
in-efficient in mesa at this point in time, since it always updates all derived
state even when it may not relate to the state being requested.
Robert Bragg [Fri, 19 Jun 2009 11:15:12 +0000 (12:15 +0100)]
[cogl] Ensure well defined semantics for COGL_INVALID_HANDLE material layers
Fixes and adds a unit test for creating and drawing using materials with
COGL_INVALID_HANDLE texture layers.
This may be valid if for example the user has set a texture combine string
that only references a constant color.
_cogl_material_flush_layers_gl_state will bind the fallback texture for any
COGL_INVALID_HANDLE layer, later though we could explicitly check when the
current blend mode does't actually reference a texture source in which case
binding the fallback texture is redundant.
This tests drawing using cogl_rectangle, cogl_polygon and
cogl_vertex_buffer_draw.
Robert Bragg [Tue, 30 Jun 2009 16:17:30 +0000 (17:17 +0100)]
Merge branch 'cogl-journal-batching'
[cogl] Improve ability to break out into raw OpenGL via begin/end mechanism
Adds a cogl_flush() to give developers breaking into raw GL a fighting chance
[cogl-material] Be more carefull about flushing in cogl_material_remove_layer
Revert "[rectangle] Avoid modifying materials mid scene"
Revert "[actor] Avoid modifying materials mid-scene to improve journal batching"
[cogl-vertex-buffer] Disable unused client tex coord arrays
[cogl] disable all client tex coord arrays in _cogl_add_path_to_stencil_buffer
[cogl] flush matrices in _cogl_add_path_to_stencil_buffer
[journal] Don't resize a singlton VBO; create and destroy a VBO each flush
[cogl] avoid using the journal in _cogl_add_path_to_stencil_buffer
[pango-display-list] Use the Cogl journal for short runs of text
[material] _cogl_material_equal: catch the simplest case of matching handles
[material] avoid flushing the journal when just changing the color
[cogl journal] Perform software modelview transform on logged quads.
[Cogl journal] use G_UNLIKLEY around runtime debugging conditions
[cogl journal] Adds a --cogl-debug=batching option to trace batching
[Cogl journal] Adds a --cogl-debug=journal option for tracing the journal
[cogl] Adds a debug option for disabling use of VBOs --cogl-debug=disable-vbos
[cogl] Force Cogl to always use the client side matrix stack
[cogl-debug] Adds a "client-side-matrices" Cogl debug option
[cogl-color] Adds a cogl_color_equal() function
[cogl material] optimize logging of material colors in the journal
[rectangle] Avoid modifying materials mid scene
[actor] Avoid modifying materials mid-scene to improve journal batching
[journal] Always pad our vertex data as if at least 2 layers are enabled
[cogl] Improving Cogl journal to minimize driver overheads + GPU state changes
The Cogl journal is a mechanism Cogl uses to batch geometry resulting from
any of the cogl_rectangle* functions before sending it to OpenGL. This aims
to improve the Cogl journal so that it can reduce the number of state
changes and draw calls we issue to the OpenGL driver and hopfully improve
performance.
Previously each call to any of the cogl_rectangle* functions would imply an
immediate GL draw call, as well as a corresponding modelview change;
material state changes and gl{Vertex,Color,TexCoord}Pointer calls. Now
though we have tried to open the scope for batching up as much as possible
so we only have to flush the geometry either before calling glXSwapBuffers,
or when we change state that isn't tracked by the journal.
As a basic example, it's now possible for us to batch typical picking
renders into a single draw call for the whole scene.
Some key points about this change:
- We now perform transformations of quads in software (except for long runs of
text which continue to use VBOs)
* It might seem surprising at first, but when you consider that so many
Clutter actors are little more than textured quads and each actor
typically implies a modelview matrix change; the costs involved in
setting up the GPU with the new modelview can easily out weigh the cost
of simply transforming 4 vertices.
- We always use Cogl's own client side matrix API now.
* We found the performance of querying the OpenGL driver for matrix state
was often worse than using the client matrix code, and also - discussing
with Mesa developers - agreed that since khronos has essentially
deprecated the GL matrix API (by removing it from OpenGL 3 and
OpenGL-ES 2) it was appropriate to take full responsibility for all our
matrix manipulation.
- Developers should avoid modifying materials mid-scene.
* With the exception of material color changes, if you try and modify a
material that is referenced in the journal we will currently force a
journal flush. Note: you can assume that re-setting the same value for
a material property won't require a flush though.
- Several new --cogl-debug options have been added
* "disable-batching" can be used to identify bugs in the way that the
journal does its batching; of could this shouldn't ever be needed :-)
* "disable-vbos" can be used to test the VBO fallback paths where we
simply use malloc()'d buffers instead.
* "batching" lets you get an overview of how the journal is batching
your geometry and may help you identify ways to improve your
application performance.
* "journal" lets you trace all the geometry as it gets logged in the
journal, and all the geometry as its flushed from the journal.
Obviously an inconsistency can identify a bug, but the numbers may
help you verify application logic too.
* "disable-software-transform" as implied will instead use the driver
/GPU to transform quads by the modelview matrix.
Although committed separately a --clutter-debug=nop-picking option was
also added that lets you remove picking from the equation, which can
sometimes help make problem analysis more deterministic.