Commit Graph

4608 Commits

Author SHA1 Message Date
Neil Roberts
ab05f6bfb1 cogl-material: Add support for point sprites
This adds a new API call to enable point sprite coordinate generation
for a material layer:

void
cogl_material_set_layer_point_sprite_coords_enabled (CoglHandle material,
                                                     int layer_index,
                                                     gboolean enable);

There is also a corresponding get function.

Enabling point sprite coords simply sets the GL_COORD_REPLACE of the
GL_POINT_SPRITE glTexEnv when flusing the material. There is no
separate application control for glEnable(GL_POINT_SPRITE). Instead it
is left permanently enabled under the assumption that it has no affect
unless GL_COORD_REPLACE is enabled for a texture unit.

http://bugzilla.openedhand.com/show_bug.cgi?id=2047
2010-07-08 16:34:30 +01:00
Neil Roberts
73642ac9c4 cogl-material: Add a property for setting the point size
This adds cogl_material_{get,set}_point_size. If the point size is not
1.0f then glPointSize will be called when the material is flushed.

http://bugzilla.openedhand.com/show_bug.cgi?id=2047
2010-07-08 16:34:30 +01:00
Neil Roberts
c76d53a9c4 tests/accessibility: Fix the soname for libclutter
The required .so file was named using @CLUTTER_WINSYS@ but since
bf9d5f3949 the .so should be named with @CLUTTER_SONAME_INFIX@. This
was breaking the build on eglx.
2010-07-08 15:32:48 +01:00
Robert Bragg
b2decfe762 material: support dumping layer state graph to dot file
Recently I added a _cogl_debug_dump_materials_dot_file function for
debugging the sparse material state. This extends the state dumped to
include the graph of layer state also.
2010-07-07 20:46:50 +01:00
Robert Bragg
7eedf0f234 material: set ->layer_index on new layers for unit0
We were mistakenly only initializing layer->layer_index for new layers
associated with texture units > 0. This had gone unnoticed because
normally layers associated with texture unit0 have a layer index of 0
too. Mutter was hitting this issue because it was initializing layer 1
before layer 0 for one of its materials so layer 1 was temporarily
associated with texture unit 0.
2010-07-07 20:46:04 +01:00
Øyvind Kolås
9e730727ca state: add clutter_state_set_state and clutter_state_warp_to_state
Replaced clutter_state_change with a boolean argument for animating the
transition or not with two separate argument-less methods.
2010-07-07 18:17:09 +01:00
Emmanuele Bassi
f87e4037a8 build: Distcheck fixes after the Cally merge 2010-07-07 16:30:31 +01:00
Emmanuele Bassi
e3a8ece54d Merge branch 'cally-merge'
* cally-merge:
  cally: Add introspection generation
  cally: Improving cally doc
  cally: Cleaning CallyText
  cally: Refactoring "window:create" and "window:destroy" emission code
  cally: Use proper backend information on CallyActor
  cally: Check HAVE_CONFIG_H on cally-util.c
  docs: Fix Cally documentation
  cally: Clean up the headers
  Add binaries of the Cally examples to the ignore file
  docs: Add Cally API reference
  Avoid to load cally module on a11y examples
  Add accessibility tests
  Initialize accessibility support on clutter_init
  Rename some methods and includes to avoid -Wshadow warnings
  Cally initialization code
  Add Cally
2010-07-07 16:06:30 +01:00
Robert Bragg
175317a754 test-timeline: instantiate a stage so the master clock runs
This makes test-timeline get the default stage so there is at least one
stage instantiated. Without any stages the master clock will never run
which was causing this test to fail.
2010-07-07 16:00:46 +01:00
Emmanuele Bassi
a3c69dc27c cally: Add introspection generation
Toolkits and applications not written in C might still need access to
the Cally API to write accessibility extensions based on it for their
own native elements.
2010-07-07 15:57:43 +01:00
Emmanuele Bassi
7d1445afca Restore the report on the conformance test suite
The report generation was broken by the split of the various test units;
also, we were using GTest in a way that's not really sanctioned by
upstream.

This commit tries to re-use the targets from GLib's Makefile rules while
compensating for our own set up.
2010-07-07 14:52:19 +01:00
Emmanuele Bassi
608a5a8ae6 x11: Clean up NET_WM_STATE modifiers
Use a separate function to avoid code duplication.
2010-07-07 14:52:19 +01:00
Emmanuele Bassi
eca398f113 x11: Do not swallow XSettings events
We might want pieces higher in the stack (like Mx) to handle XSettings
events as well, and swallowing them by removing them from the events
queue would make it impossible.
2010-07-07 14:52:19 +01:00
Alejandro Piñeiro
a2f8ce175f cally: Improving cally doc
* Add documentation for all undocumented symbols
  * Add an overview section
2010-07-07 15:48:08 +02:00
Alejandro Piñeiro
c931e11e3d cally: Cleaning CallyText
* Removing superfluous g_return_if_fail
  * Removing unused ClutterText::text-changed callback
2010-07-07 15:48:00 +02:00
Alejandro Piñeiro
137790bec9 cally: Refactoring "window:create" and "window:destroy" emission code
Previously "window:create" and "window:destroy" were emitted on
CallyUtil. Although it works, and CallyUtil already have callbacks to
stage_added/removed signals, I think that it is more tidy/clear to do
that on CallyRoot:

  * CallyRoot already has code to manage ClutterStage addition/removal

  * In fact, we can see CallyRoot as the object exposing the a11y
    information from ClutterStageManager, so it fits better here.

  * CallyUtil callbacks these signals are related to key event
    listeners (key snooper simulation). One of the main CallyUtil
    responsabilities is managing event (connecting, emitting), so I
    would prefer to not start to add/mix more functionalities here.

Ideally it would be better to emit all CallyStage methods from
CallyStage, but it is clear that "create" and "destroy" are more easy
to emit from a external object
2010-07-07 15:47:56 +02:00
Alejandro Piñeiro
ffd1f12560 cally: Use proper backend information on CallyActor
It uses HAVE_CLUTTER_GLX to check the current backend in use for
some accessibility related methods.

Fixes CB#2071
2010-07-07 15:47:45 +02:00
Alejandro Piñeiro
d45499f88b cally: Check HAVE_CONFIG_H on cally-util.c 2010-07-07 15:46:34 +02:00
Robert Bragg
1dd174add3 framebuffer: Replace CoglHandle with CoglFramebuffer *
One more object converted to stop using CoglHandle re:a8c8cbee513
2010-07-07 14:41:54 +01:00
Robert Bragg
9b9e764dc1 material: route fogging state through CoglMaterial
Previously cogl_set_fog would cause a flush of the Cogl journal and
would directly bang the GL state machine to setup fogging. As part of
the ongoing effort to track most state in CoglMaterial to support
renderlists this now adds an indirection so that cogl_set_fog now just
updates ctx->legacy_fog_state. The fogging state then gets enabled as a
legacy override similar to how the old depth testing API is handled.
2010-07-07 14:12:15 +01:00
Robert Bragg
279e68d8d9 osx: explicitly request depth and stencil buffer bits
This is a blind patch because I don't know enough about the osx backend
and the osx backend probably doesn't even work these days anyway but
since people have filed bugs specifically on OSX that imply they don't
have a depth or stencil buffer this tries to fix that.

Maybe someone will eventually pick up the osx backend again and verify
if this helps.

http://bugzilla.clutter-project.org/show_bug.cgi?id=1394
2010-07-07 14:09:32 +01:00
Robert Bragg
2e0d2cf055 cogl-buffer: Move malloc fallback logic into CoglBuffer
Since we'll want to share the fallback logic with CoglVertexArray this
moves the malloc based fallback (for when OpenGL doesn't support vertex
or pixel buffer objects) into cogl-buffer.c.
2010-07-07 14:08:11 +01:00
Robert Bragg
2353aa56ea cogl-buffer: consider it an error to free a mapped buffer
Explicitly warn if we detect that a CoglBuffer is being freed while it
is still mapped. Previously we silently unmapped the buffer, but it's
not something we want to encourage.
2010-07-07 14:08:11 +01:00
Robert Bragg
429d7cf696 cogl-buffer: Track the last used bind target in CoglBuffer
This makes CoglBuffer track the last used bind target as a private
property. This is later used when binding a buffer to map instead of
always using the PIXEL_UNPACK target.

This also adds some additional sanity checks that code doesn't try to
nest binds to the same target or bind a buffer to multiple targets at
the same time.
2010-07-07 14:08:11 +01:00
Robert Bragg
551945ce6c tests: Force X synchronization so the stage size is reliable
Normally the asynchronous nature of X means that setting the clutter
stage size may really happen an indefinite amount of time later but
since the tests are so short lived and may only render a single frame
this is not an acceptable semantic.

This way we should be able to remove all the hacky sleeps and frame
count delays from our tests.
2010-07-07 14:07:22 +01:00
Robert Bragg
b24c96189d tests: no longer clean up state between tests
Since we now run every test in a separate process there is no need to
try and avoid state leakage between tests. This removes the code to
cleanup all children of the stage and disconnect handlers from the
stage paint signal. We now explicitly print a warning if the users tries
to run multiple tests in one process.
2010-07-07 14:07:17 +01:00
Robert Bragg
3570852b02 cogl: expose the semantic differences of gl/gles2 npot textures
This adds three new feature flags COGL_FEATURE_TEXTURE_NPOT_BASIC,
COGL_FEATURE_TEXTURE_NPOT_MIPMAP and COGL_FEATURE_TEXTURE_NPOT_REPEAT
that can tell you if your hardware supports non power of two textures,
npot textures + mipmaps and npot textures + wrap modes other than
CLAMP_TO_EDGE.

The pre-existing COGL_FEATURE_TEXTURE_NPOT feature implies all of the
above.

By default GLES 2 core supports npot textures but mipmaps and repeat
modes can only be used with power of two textures. This patch also makes
GLES check for the GL_OES_texture_npot extension to determine if mipmaps
and repeating are supported with npot textures.
2010-07-07 13:26:41 +01:00
Elliot Smith
9e5a18fea4 cookbook: Fixed typo
Removed stray 'd' character.
2010-07-06 17:20:43 +01:00
Elliot Smith
7c67903a44 cookbook: Fix build so CSS files get installed
I had changed the build so CSS files get put into
the HTML build directory; but done it in such
a way that they were then being ignored during
install. Fixed this.
2010-07-06 17:20:39 +01:00
Elliot Smith
e566c56bd1 cookbook: Moved paragraph where it logically belongs
There was a note about constants for keys and
where they are defined in Clutter header files; but
the sentence about where key modifiers are defined
was outside the note. Logically, they belong
together.
2010-07-06 17:20:34 +01:00
Elliot Smith
03b19af38e cookbook: Added some judicious note elements
In some cases, there were blocks of text which
were really asides/interrupts to the flow, but
which weren't explicitly marked as such. I fixed
them by turning them into <note> blocks.
2010-07-06 17:20:25 +01:00
Elliot Smith
9a609cf629 cookbook: Added more information for contributors
Suggested use of <note> element for adding detail
or asides which would otherwise interrupt the
flow of the recipe.
2010-07-06 17:20:21 +01:00
Elliot Smith
15331d3a01 cookbook: Link out to docbook site
Corrected the link on the word Docbook, as it
was an internal <link> rather than an external
<ulink>.
2010-07-06 17:20:16 +01:00
Elliot Smith
c108a32c30 cookbook: Made docbook element usage consistent
Made usage of docbook elements consistent across
recipes; to ensure the conventions are kept by others,
added a section about how to write and style recipes.
2010-07-06 17:20:09 +01:00
Elliot Smith
fe7385cb7d cookbook: Additional selectors in CSS stylesheet
Added some selectors for docbook element types
[properties and types], so those elements can be used in recipes
2010-07-06 17:20:02 +01:00
Elliot Smith
dfe7c554fd cookbook: Copy the CSS file into the HTML build directory
This makes local testing easier, as you can see what the
cookbook will look like when installed.
2010-07-06 17:19:56 +01:00
Neil Roberts
ced7915ea1 cogl-vertex-buffer: Fix the #define for glDisableVertexAttribArray
glDisableVertexAttribArray was defined to glEnableVertexAttribArray so
it would probably cause crashes if it was ever used. Presumably
nothing is using these yet because the generic attributes are not yet
tied to shader attributes in a predictable way.
2010-07-06 16:08:44 +01:00
Robert Bragg
6757f41c86 configure: Improves GLES 1.x checks
We now always aim to use pkg-config based configuration when possible,
but when not configure.ac now knows the difference between GLES_CM
libraries that contain EGL symbols (I.e. a separate EGL library doesn't
need to be found) and GLESv1_CM libraries that don't contain EGL
symbols.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2160
2010-07-06 15:02:36 +01:00
Øyvind Kolås
5cb4e0c5d0 test-state: fix test for state count after state removal
In the .json file used for the test, there is no null -> "base"
transition defined only a "clicked" -> "base", when the "clicked" state
is removed the "base" state will also disappear.
2010-07-06 14:28:14 +01:00
Øyvind Kolås
290038ee68 animator: fix removal of multiple keys
When removing keys, sometimes a couple of keys would be remaining.
2010-07-06 14:14:34 +01:00
Øyvind Kolås
ec05230b97 state: added clutter_state_key_get_property_type
A function to retrieve the type of the value stored in a key, the
equivalent already exists for ClutterAnimator.
2010-07-06 14:14:34 +01:00
Øyvind Kolås
6d1f697bc4 state: automatically remove unused states
When there is no further keys with a state as the target state, remove
the state (and all transitions that used this state as a target)
2010-07-06 14:14:34 +01:00
Alexandros Frantzis
140f76abf4 build: Exclude built sources from the dist
http://bugzilla.clutter-project.org/show_bug.cgi?id=2169

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-07-06 13:24:00 +01:00
Damien Lespiau
1860d45087 build: Allow to run the tests from any directory
I was fed up to cd into the tests/conform or tests/interactive directories
to launch a specific test. Now, with the power the abs_ variants of
builddir and srcdir we can run specific test from any directory.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2159
2010-07-06 12:39:15 +01:00
Robert Bragg
739240095f debug: Adds a COGL_DEBUG=disable-pbos debug option
For testing purposes, either to identify bugs in Cogl or the driver or
simulate lack of PBO support COGL_DEBUG=disable-pbos can be used to
fallback to malloc instead.
2010-07-06 12:09:01 +01:00
Robert Bragg
b4b98358e1 pango-render: set CLAMP_TO_EDGE wrap mode on glyph_material
The pango renderer was causing lots of override materials to be allocated
because the vertex_buffer API converts AUTOMATIC mode into REPEAT for
backwards compatibility. By explicitly setting the wrap mode to
CLAMP_TO_EDGE when creating the glyph_material then the vertex_buffer
API will leave it untouched.
2010-07-06 12:07:29 +01:00
Robert Bragg
82ba7220af pixel-array: Allow passing of hints to cogl_buffer_map
This allows you to tell Cogl that you are planning to replace all the
buffer's data once it is mapped with cogl_buffer_map. This means if the
buffer is currently being accessed by the GPU then the driver doesn't
have to stall and wait for it to finish before it can access it from the
CPU and can instead potentially allocate a new buffer with undefined
data and map that.
2010-07-06 12:07:28 +01:00
Robert Bragg
0273b13d75 test-cogl-pixel-array: fix how data is initialized
There was a missing '* 4' and '* i' in the for() loops that initialized
the first test buffer, so it was containing uninitialized data causing
the test to fail.
2010-07-06 12:07:28 +01:00
Emmanuele Bassi
fb79b0c14e moduleset: Update cairo and pixman versions
The gtk+ we use for clutter-gtk depends on a new version of Cairo.
2010-07-06 11:57:16 +01:00
Emmanuele Bassi
aa8ffef543 moduleset: Remove libXft
The system one should be enough.
2010-07-06 11:42:08 +01:00