* configure.ac: Clean up a bit the X11 and X extensions
checks with PKG_CHECK_EXISTS(). Since we are filling up the
X11_CFLAGS and X11_LIBS variables ourselves there is no
point in polluting the Makefiles with unused variables.
* clutter/Makefile.am: Remove the pkg-config variable
evaluation and use the values retrieved from the configure
script.
* clutter/clutter-entry.c: (clutter_entry_ensure_layout),
(clutter_entry_handle_key_event_internal),
(clutter_entry_set_text):
Fix mix-up of character and byte counts, handle unicode correctly.
Use clutter_key_event_unicode() instead of
clutter_keysym_to_unicode().
* clutter/clutter-event.c: (clutter_key_event_unicode):
Don't ignore ClutterKeyEvent.unicode_value
* clutter/clutter-keysyms-table.h:
Rename header define so as not to conflict with clutter-keysyms.h
Patch originally by Emmanuele Bassi, with input from Tommi Komulainen.
control the use of mipmapping.
* clutter/clutter-texture.h: added ClutterTextureQuality enum.
* tests/test-texture-quality.c: new test.
* tests/Makefile.am: added test-texture-quality
* clutter/clutter-texture.c:
(clutter_texture_class_init): Do not unrealize on hide(), and
do not realize() on show. By default, clutter_actor_show() will
realize ourselves, and we don't want to unrealize when hidden
to avoid paying the penalty of reading back the texture data
from the video memory.
* tests/test-actors.c: Show all textures again when pressing
the 'r' key.
Bug #927 - Created ports for clutter, clutter-cairo in macports
* clutter/clutter-docs.sgml: Update the OSX build instructions
and mention that the preferred way to build Clutter for developing
applications is via MacPorts. (#927, Idan Gazit)
sampler2DRect now that GL_TEXTURE_RECTANGLE support is disabled in
revision 2834. The ClutterTexture actor now has the
'disable-slicing' property set. The distance in texture
coordinates between pixels is passed in as a uniform so that the
box-blur shader can still work.
Bug #955 - ClutterLabel is missing fallback resolution handling
* clutter/clutter-label.c (clutter_label_init): Handle
clutter_backend_get_resolution() return value -1 similar to
ClutterEntry (falling back to 96.0). (#955, Tommi Komulainen)
(clutter_stage_egl_realize): Use ES 2 renderable type when
building for GLES 2.
* clutter/eglnative/clutter-event-egl.c (get_backend_time): Added
a NULL for the microseconds parameter of g_timer_elapsed.
* clutter/eglnative/clutter-stage-egl.h:
* clutter/eglnative/clutter-egl.h:
* clutter/eglnative/clutter-backend-egl.h: Include
clutter-egl-headers.h instead of including the GL headers directly
so it can include gl2.h when building for GLES 2.
* clutter/eglnative/clutter-egl-headers.h:
* clutter/eglnative/Makefile.am (libclutter_eglnative_la_SOURCES):
Added clutter-egl-headers.h
* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: GLES 2
doesn't provide a default precision for floats in the fragment
shader and it will reject the shader if there isn't one.
Bug #948 - Remove texture rectangle support
* clutter/clutter-feature.c:
* clutter/clutter-feature.h:
* clutter/clutter-texture.c:
* clutter/cogl/gl/cogl.c:
* clutter/glx/clutter-glx-texture-pixmap.c:
Remove support for GL_TEXTURE_RECTANGLE_ARB (now using just regular
2D textures, with optional npots extension). Simplifys code, + makes
mipmap & shader support much more sane.
Bug 913 - cogl fails to build on OSX
* clutter/cogl/gl/cogl-fbo.c: define GL_READ_FRAMEBUFFER_EXT and
GL_DRAW_FRAMEBUFFER_EXT if not defined in the build system. The
#ifdef can fail if they're not #defines but variables or enums.
As the values are supposed to be industry standard even then
it shouldn't have ill effects.
Bug #911 - OSX: add multistage support
* clutter/osx/clutter-backend-osx.{c,h}
(clutter_backend_osx_init_stage, clutter_backend_osx_get_stage,
clutter_backend_osx_redraw, clutter_backend_osx_create_stage,
clutter_backend_osx_ensure_context, clutter_backend_osx_class_init,
clutter_backend_osx_dispose, ClutterGLView:drawRect:):
* clutter/osx/clutter-stage-osx.{c,h} (clutter_stage_osx_realize,
ClutterGLWindow:setFrameSize:):
Adapt to new multistage backend API. Don't keep a pointer to
default stage. Derive from ClutterActor instead of ClutterStage.
Implement ClutterStageWindow interface. Paint, resize and
otherwise manipulate the wrapper rather than self when necessary.
(clutter_backend_post_parse): Create our singleton GL context
here. We could probably create the context when the default
stage is created, but I think this is more clean.
* clutter/osx/clutter-event-osx.c (clutter_event_osx_translate)
* clutter/osx/clutter-stage-osx.c (clutter_stage_osx_state_update,
ClutterGLWindow:windowShouldClose:):
* clutter/osx/clutter-stage-osx.h: Export ClutterGLWindow interface
for clutter-event-osx.c to easily get the stage for NSWindow.
Fill in ClutterEventAny::stage on our events.
Consistently use 'stage_osx' and 'wrapper' as variable names
when referring to ClutterStageOSX and ClutterStage objects
respectively.
* tests/Makefile.am:
* tests/test-paint-wrapper.c: Add a test case (merely, a copy
of test-actors.c) that verifies that handlers to the ::paint
signal are called in the right order.
Bug #840 - Implement prepare-paint and finish-paint signals.
* clutter/clutter-actor.c:
(clutter_actor_class_init): Add the ::paint, ::realize and
::unrealize signals to ClutterActor. It is possible to
override the paint, realization and unrealization of an
actor without subclassing it. The ::paint signal handlers
have the same limitations of a ClutterActor::paint implementation
inside a subclass.
(clutter_actor_realize),
(clutter_actor_unrealize),
(clutter_actor_paint): Emit the signals instead of calling
the functions from the class vtable.
* clutter/clutter-stage.c (clutter_stage_get_default): Don't grab
the floating reference when creating the default stage. The stage
manager will take a reference to it so it will behave as any other
stage.
(clutter_stage_new): Don't take the floating reference to the new
stage but let the stage manager keep it instead.
* clutter/clutter-stage-manager.c
(_clutter_stage_manager_add_stage): Take a reference to the stage
when it is added to the list.
(_clutter_stage_manager_remove_stage): Unref the stage when it is
removed from the list.
(clutter_stage_manager_dispose): Keep track of the 'next' pointer
as a separate variable so we can cope when the stage being
destroyed removes itself from the list as the list is being
iterated.
* clutter/clutter-actor.c (clutter_actor_destroy): Take a
reference at the beginning of the function even if there is no
parent container so that overall the reference count is not
changed when the actor is unref'd again at the bottom of the
function. Previously it would have a net effect of leaving the
reference count alone unless it is a top level actor in which case
it would unref it.
* clutter/glx/clutter-glx-texture-pixmap.c:
Dont always fallback to x11 (slow) updates for a single
failed pixmap.
Minor cleanups.
* clutter/x11/clutter-x11-texture-pixmap.c:
Move shm allocation to only area updates.
* clutter/cogl/gles/cogl.c:
* clutter/cogl/gl/cogl.c: The clip planes are now set using the
inverse projection matrix as the modelview matrix so that they can
be specified in screen coordinates.
* clutter/cogl/gles/cogl-context.h (CoglContext):
* clutter/cogl/gl/cogl-context.h (CoglContext): Added a member to
cache the inverse projection matrix
* clutter/clutter-fixed.h: Added a constant for converting from
radians to degrees.
* clutter/clutter-fixed.c (clutter_atani, clutter_atan2i): Added
fixed-point versions of atan and atan2.
* tests/test-clip.c: Added a test for clipping with various
rotations and depths.
* tests/Makefile.am (noinst_PROGRAMS): Added test-clip
now stored in a separate struct so they can be stored for
application program objects as well.
* clutter/cogl/gles/cogl.c: Moved stub shader functions into
separate files.
(_cogl_features_init): Report support for the shaders feature on
GLES 2
* clutter/cogl/gles/cogl-shader.h:
* clutter/cogl/gles/cogl-shader.c:
* clutter/cogl/gles/cogl-program.h:
* clutter/cogl/gles/cogl-program.c: Separate files to handle
shaders on programs on GLES. If version 1.1 is being used then the
stub functions which all fail are still used.
* clutter/cogl/gles/cogl-gles2-wrapper.c
(cogl_gles2_wrapper_init, cogl_gles2_wrapper_bind_attributes),
(cogl_gles2_wrapper_get_uniforms): Move the uniforms and attribute
bindings into a separate function so they can be used to bind on
application shaders as well.
(cogl_gles2_wrapper_update_matrix): Now takes a parameter and is
no longer static so that it can be used to update all of the
matrices when a new shader is bound.
* clutter/cogl/gles/cogl-defines.h.in: Use GL_COMPILE_STATUS for
CGL_OBJECT_COMPILE_STATUS if the latter isn't available (for
example on GLES 2).
* clutter/cogl/gles/cogl-context.h (CoglContext): Added handle
arrays for programs and shaders.
* clutter/cogl/gles/cogl-context.c (cogl_create_context)
(cogl_destroy_context): Initialize and destroy program and shader
handle array.
* clutter/cogl/gles/Makefile.am (libclutter_cogl_la_SOURCES): Add
cogl-{shader,program}.{c,h}
Merge from clutter-0-6:
* clutter/clutter-model.c:
(clutter_model_iter_set_internal_valist): Add an internal function
wrapping ClutterModelIter::set_value that does not emit the
::row-changed signal. Emitting this signal before the ::row-added
one is wrong: a row cannot change before being inserted.
(clutter_model_append), (clutter_model_prepend),
(clutter_model_insert): Use the non-signal emitting variant of
clutter_model_iter_set_valist().
(clutter_model_iter_set_valist): Use the internal version and emit
the ::row-changed signal at the end.
Bug #943 - Signals are only emitted within a certain area of
the stage
* clutter/clutter-main.c (clutter_do_event): Use the proper
API and not the macros for the default stage, in case we are
using a backend supporting multiple stages. (Julian Aron Prenner)
* clutter/pango/pangoclutter-fontmap.c:
* clutter/pango/pangoclutter-renderer.c:
* clutter/pango/pangoclutter.h
* clutter/pango/pangoclutter-private.h: Add a function retrieving
the font mipmapping setting.
uniforms for alpha testing.
* clutter/cogl/gles/cogl-gles2-wrapper.c
(cogl_gles2_wrapper_init): Get the uniforms for alpha testing
settings.
(cogl_wrap_glEnable, cogl_wrap_glDisable): Enable/disable alpha
testing.
(cogl_wrap_glAlphaFunc): Filled in the wrapper.
* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: Added alpha
testing.
* clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c
(cogl_wrap_glGetIntegerv): Added a wrapper for glGetIntegerv so
that it can report zero clip planes.
* clutter/cogl/gles/cogl.c:
* clutter/cogl/gles/cogl-texture.c: Use the wrapped version of
glGetIntegerv
* clutter/cogl/gles/cogl-primitives.c (_cogl_path_fill_nodes): Use
_cogl_features_available to check for the stencil buffer instead
of an #ifdef. The stencil buffer is available in the default
profile for the GLES 2 simulator.
(cogl_gles2_wrapper_init): Get uniforms for fog parameters and
initialise them.
(cogl_wrap_glDrawArrays): Store the modelview matrix in a uniform
as well so that it can be used for fogging calculations.
(cogl_wrap_glEnable, cogl_wrap_glDisable): Enable/disable fogging.
(cogl_wrap_glFogx, cogl_wrap_glFogxv): Fill in wrapper to set
fogging parameters.
* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl: Calculate the
fog amount if fogging is enabled.
* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: Mix with fog
color.
* clutter/cogl/gles/cogl-gles2-wrapper.h (CoglGles2Wrapper): Add
uniforms for fogging.
Bug #919 - Replacement pango renderer (Neil Roberts)
* clutter/clutter-backend.h:
* clutter/clutter-backend.c:
(clutter_backend_set_font_options),
(clutter_backend_get_font_options): Add the ability to set
the cairo_font_options_t* for the backend at construction
time, so that backend implementations can have their own
options.
* clutter/clutter-color.c: Include pango/pango-attributes.h
for the pango_color_parse() function.
* clutter/clutter-label.c:
(clutter_label_ensure_layout),
(clutter_label_init), (clutter_label_set_text),
(clutter_label_set_font_name), (clutter_label_set_ellipsize),
(clutter_label_set_use_markup): Ensure that the cache is
always primed when the Label changes; this makes sure that
the cache is rebuilt outside the paint run, which should
make the painting perform better especially on embedded
devices.
* clutter/clutter-entry.c:
(clutter_entry_ensure_layout),
(clutter_entry_init), (clutter_entry_set_text),
(clutter_entry_set_font_name): Ditto as above.
* clutter/clutter-private.h:
* clutter/clutter-main.[ch]: Create the font-map inside the
main context; add two new functions:
clutter_clear_glyph_cache()
clutter_set_use_mipmapped_text()
that control the glyphs cache.
* clutter/pango/Makefile.am:
* clutter/pango/pangoclutter-fontmap.c:
* clutter/pango/pangoclutter-private.h:
* clutter/pango/pangoclutter-render.c:
* clutter/pango/pangoclutter.h: Rewrite the Pango renderer
using a PangoCairo context and saving the glyphs inside a
more efficient cache.
* configure.ac: Depend on pangocairo instead of pangoft2.
Bug 882 - Allow child properties for containers implementing the
ClutterContainer interface (Øyvind Kolås)
* clutter/clutter-child-meta.[ch]: Base class for the metadata
of a ClutterActor inside a ClutterContainer; the ChildMeta
object implements a wrapper for storing data that is attached
to a ClutterActor only when it's part of a ClutterContainer.
The ChildMeta object is used to store the child properties
accessible through the ClutterContainer API.
* clutter/clutter-container.[ch]: Creates the ChildMeta for
each actor, in case the Container specifies the ChildMeta
type to use.
* clutter/Makefile.am: Add clutter-child-meta.[ch] to the build.
* clutter/clutter-marshal.list: Add the marshaller for the
ClutterContainer::child-notify signal.
* clutter/clutter-types.h: Declare ClutterContainer and
ClutterChildMeta to avoid recursive inclusion.
Fix merging of objects with the same id.
* clutter/clutter-script.c:
(json_object_end): If there already is an ObjectInfo under the
parsed id, merge the construction with the currently stored
state.
(parse_children), (parse_signals),
(parse_behaviours): Append the newly parsed children, signals
and behaviours, in case the ObjectInfo already has unresolved
items.
(clutter_script_construct_object): Fix a typo in the type check.
(clutter_script_init): Do not copy the key inside the hash
table holding the objects - we are already holding it inside
the value.