* clutter/eglx/clutter-stage-egl.h:
* clutter/eglx/clutter-egl-headers.h:
* clutter/eglx/clutter-backend-egl.h:
* clutter/eglx/Makefile.am: Include the GLES and EGL headers via
clutter-egl-headers.h so that the right version can be used
depending on whether the GLES 2 wrapper is being used.
* configure.ac: Added an automake conditional for whether the GLES
2 wrapper should be used.
* clutter/eglx/clutter-stage-egl.c (clutter_stage_egl_realize):
Remove the call to glGetIntegerv to get the max texture size. It
was being called before the GL context was bound so it didn't work
anyway and it was causing trouble for the GLES 2 simulator.
* clutter/cogl/gles/stringify.sh: Shell script to convert the
shaders into a C string.
* clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c: Wrappers for most of the
missing GL functions in GLES 2.
* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl:
* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl: New shaders for
GLES 2
* clutter/cogl/gles/cogl-defines.h.in: Use the @CLUTTER_GL_HEADER@
macro instead of always using the GLES 1 header.
* clutter/cogl/gles/cogl-context.h (CoglContext): Include a field
for the state of the GLES 2 wrapper.
* clutter/cogl/gles/cogl-texture.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl.c: Use wrapped versions of the GL
functions where neccessary.
* clutter/cogl/gles/Makefile.am: Add sources for the GLES 2
wrapper and an extra build step to put the GLSL files into a C
string whenever the files change.
* clutter/cogl/gles/cogl.c (error_string): Rename to
_cogl_error_string and remove the static scoping so that it can be
called in cogl-texture etc.
* clutter/cogl/gl/cogl-texture.c (cogl_texture_new_from_foreign):
* clutter/cogl/gles/cogl-texture.c (cogl_texture_new_from_foreign):
GE(*) can't be used to wrap around calls that use the return
value.
* clutter/cogl/gl/cogl-texture.c (_cogl_texture_quad_sw)
(_cogl_texture_quad_hw, cogl_texture_polygon): Remove GE(*)
wrapper around calls in the middle of a glBegin/glEnd pair which
otherwise always generate an error because glGetError can only be
called outside of the pair.
* clutter/cogl/gl/cogl-internal.h: Include stdio.h when definig
COGL_DEBUG and declare a prototype for _cogl_error_string.
* clutter/cogl/gles/cogl-internal.h: Match GE(*) macro to GL
version.
cogl_blend_func caches blending setup much like cogl_enable
does with the enable flags. This separates blending factors
setup from the enable/disable operation in preparation of
the texture image retrieval fix for alpha channel on GLES.
(cogl_enable:) Does not modify blending factors anymore.
* clutter/cogl/gl(es)/cogl-context.h: CoglContext holds two
new variables to cache blending src and dst factors.
* clutter/cogl/gl(es)/cogl-context.c:
(cogl_create_context:) Initialize blending factors.
* clutter/cogl/gles/cogl-texture.c:
(cogl_texture_download_from_gl:) Set blending factors to
CGL_ONE, CGL_ZERO which fixes the slighlty improper behavior
where source colour was actually multiplied with its alpha
value in the result (not noticable on current tests).
wrapped in reference-counted CoglHandles instead.
* clutter/cogl/gl/cogl-shader.c:
* clutter/cogl/gl/cogl-shader.h:
* clutter/cogl/gl/cogl-program.c:
* clutter/cogl/gl/cogl-program.h:
New files to hold the shader and program functions.
* clutter/cogl/gl/cogl.c: Removed shader and program functions.
* clutter/cogl/common/cogl-handle.h: New header to define
COGL_HANDLE_DEFINE which helps build functions to create
reference-counted handles. This reduces the amount of duplicated
code.
* clutter/cogl/gl/cogl-texture.c:
* clutter/cogl/gles/cogl-texture.c:
* clutter/cogl/gl/cogl-fbo.c: Converted to use COGL_HANDLE_DEFINE
from cogl-handle.h to avoid duplicating some of the common code.
* clutter/cogl/gles/cogl-defines.h.in:
* clutter/cogl/gl/cogl-defines.h.in: Removed COGLhandle
* clutter/cogl/gl/cogl-context.h: Added handle arrays for programs
and shaders.
* clutter/cogl/gl/cogl-context.c (cogl_create_context): Added
initialisers for shader_handles and program_handles.
(cogl_destroy_context): Added calls to g_array_free for all handle
arrays.
* clutter/cogl/gl/Makefile.am (libclutter_cogl_la_SOURCES): Added
cogl-{program,shader}.{c,h}
* clutter/cogl/common/Makefile.am
(libclutter_cogl_common_la_SOURCES): Added cogl-handle.h
* clutter/cogl/gles/cogl.c:
* clutter/cogl/cogl.h.in: Programs and shaders are now wrapped in
CoglHandles instead of COGLhandles. cogl_program_destroy and
cogl_shader_destroy is now replaced with cogl_program_unref and
cogl_shader_unref. cogl_program_ref and cogl_shader_ref are also
added.
* clutter/clutter-shader.c: Converted to use CoglHandles for the
programs and shaders instead of COGLhandles.
* cogl/cogl-sections.txt: Added cogl_shader_ref,
cogl_shader_unref, cogl_is_shader, cogl_program_ref,
cogl_program_unref, cogl_is_program and cogl_is_offscreen.
primitives and path API a bit smaller and more resembling cairo.
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl.c:
* clutter/clutter-actor.c:
* clutter/clutter-rectangle.c:
* tests/test-cogl-offscreen.c:
* tests/test-cogl-primitives.c:
* tests/test-cogl-tex-convert.c:
* tests/test-cogl-tex-foreign.c:
* tests/test-cogl-tex-getset.c:
* tests/test-cogl-tex-tile.c: updated according to changes in cogl.
* clutter/cogl/gles/cogl.c: (cogl_color):
Disable use of color4ub, issues with latest MBX SDL (#857)
* clutter/eglx/clutter-backend-egl.c:
* clutter/eglx/clutter-stage-egl.c:
* configure.ac:
Fixup for the eglx backend to work with new backend/multistage code.
Some issues remain in destroying stages.
* clutter/clutter-actor.c:
Remove uneeded stage private member.
Add show-on-set-parent prop and make so by default Actors are
now automatically shown when reparented (#791)
* clutter/eglx/clutter-backend-egl.c:
* clutter/cogl/gles/cogl.c:
A couple of minor comments.
* clutter/eglnative/Makefile.am:
Add missing clutter-egl.h header (back port from trunk)
* tests/test-actors.c:
Modify to take advantage of new show-on-set-parent functionality.
* clutter/cogl/cogl.h:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl.c:
Disable the depth test and buffer as has some strange side
effects, mainly on x/y axis rotation with multiple layers at
same depth (eg rotating text on a bg has very strange
effect). Seems no clean 100% effective way to fix without other
odd issues.. So for now move to application to handle and add
cogl_enable_depth_test() as for custom actors (i.e groups) to
enable if need be.
* clutter/clutter-feature.h:
* clutter/clutter-texture.c:
* clutter/clutter-texture.h:
* clutter/cogl/cogl.h:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl.c:
* tests/Makefile.am:
* tests/test.fbo.c:
Add initial support for FBO's in Clutter (OpenGL only so far).
See new clutter_texture_new_from_actor()
Initial implementation, needs work.
* clutter/x11/clutter-stage-x11.c:
(clutter_stage_x11_set_cursor_visible):
Fall back to again not relying on xfixes to hide cursor. *sigh*
* clutter/clutter-deprecated.h:
Add clutter_group_find_child_by_id
* clutter/cogl/cogl.h: Rename COGLhandleARB to COGLhandle.
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/cogl/gl/cogl.c: Update GL implementation of COGL.
* clutter/cogl/gles/cogl-defines.h:
* clutter/cogl/gles/cogl.c: Update GLES implementation of COGL.
* clutter/clutter-shader.c: Fix ClutterShader to use the new
COGLhandle type instead of COGLhandlerARB.
Define COGLhandleARB. (patch by Johan Bilien)
* clutter/cogl/gles/cogl-defines.h: Define COGLhandleARB on
GLES as well (using GLuint)
* clutter/cogl/gles/cogl.c: Use COGLhandleARB.
* clutter/cogl/cogl.h: Update cogl_clip_set() to accept the
clip components as ClutterFixed values
* clutter/cogl/gl/cogl.c (cogl_clip_set): Update the GL implementation
of cogl_clip_set()
* clutter/cogl/gles/cogl.c:
(cogl_rectangle_internal): Provide an internal, inlined rectangle
drawing function using fixed point values, to be shared by
cogl_clip_set() and cogl_rectangle()
(cogl_clip_set), (cogl_rectangle): Update the GLES implementation
of cogl_clip_set() and cogl_rectangle() to use the new internal
rectangle drawing function
* clutter/clutter-actor.c: Make the clip an array of ClutterUnit
values instead of pixel-based; this allows higher precision and
device independence
(_clutter_actor_apply_modelview_transform): Pass the clip
components converting from units to fixed point values, using
the new cogl_clip_set() signature
(clutter_actor_get_property), (clutter_actor_set_clip),
(clutter_actor_get_clip): Update the accessors of the clip
property
* clutter/cogl/cogl.h: Add cogl_fog_set() abstracting the
glFog() functions and enabling the GL_FOG flag.
* clutter/cogl/gl/cogl.c: Add GL implementation of cogl_fog_set().
* clutter/cogl/gles/cogl.c: Add GL/ES implementation of
cogl_fog_set().
* clutter.symbols: Add new symbols.
* clutter/clutter-stage.h: Add API to enable depth cueing on
the stage using a linear GL fog, and to set the parameters
for it (#637).
* clutter/clutter-stage.c (clutter_stage_paint): Enable the
GL fog if the ClutterStage:use-fog property is true.
* tests/test-depth.c: Test the new stage API.
* clutter/Makefile.am:
* clutter/eglx/Makefile.am:
* clutter/eglx/clutter-backend-egl.c:
* clutter/eglx/clutter-backend-egl.h:
* clutter/eglx/clutter-eglx.h:
* clutter/eglx/clutter-event-egl.c:
* clutter/eglx/clutter-stage-egl.c:
* clutter/eglx/clutter-stage-egl.h:
* clutter/glx/Makefile.am:
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-backend-glx.h:
* clutter/glx/clutter-event-glx.c:
* clutter/glx/clutter-glx.h:
* clutter/glx/clutter-stage-glx.c:
* clutter/glx/clutter-stage-glx.h:
* clutter/x11/Makefile.am:
* clutter/x11/clutter-backend-x11-private.h:
* clutter/x11/clutter-backend-x11.c:
* clutter/x11/clutter-backend-x11.h:
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-stage-x11.c:
* clutter/x11/clutter-stage-x11.h:
* clutter/x11/clutter-x11.h:
Create a new X11 backend class of which EGL and GLX 'real' backends
then subclass. Effectively shares all X11 code between both backends
avoids code duplication and brings many missing features to EGL X
backend. Requires some cleanup and testing. (#518)
* clutter/cogl/gles/cogl.c: (cogl_color):
Add define to use color4ub only if configure finds it.
If not fall back to old code.
* configure.ac:
Drop support for vincent checks.
Drop sdles backend.
Specifically check for color4ub call.
* clutter/cogl/gles/cogl.c: (cogl_color):
Switch over to using glColor4ub in the GLES backend. It's available in
the header file but missing in the reference manual.
* clutter/clutter-actor.c:
* clutter/clutter-event.h:
* clutter/clutter-main.c:
* clutter/clutter-stage.c:
* clutter/clutter-stage.h:
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-backend-glx.h:
* clutter/glx/clutter-event-glx.c:
* clutter/glx/clutter-stage-glx.c:
* clutter/glx/clutter-stage-glx.h:
Add initial support for stage state events.
Fix fullscreening for an already mapped stage.
* tests/test-events.c:
Print out info from the above. Blue button now toggles
fullscreen.
* clutter/clutter-effect.c:
* clutter/clutter-effect.h:
Add a setting for templates to ref or clone underlying
timelines. (As to improve sync issues like those in foofone)
* tests/test-timeline.c:
Also add completed signals.
* clutter/cogl/gles/cogl.c: (cogl_texture_image_2d):
* configure.ac:
Forward port from stable branch. RGB Image fixes gles
and check for lower case libgles_cm.
* clutter/clutter-texture.c: (texture_upload_data):
Fix a SEGV for GL ES textures.
* clutter/cogl/gles/cogl.c: (cogl_setup_viewport):
Tweak default z_camera for 60 degrees like GL.
* clutter/egl/clutter-backend-egl.c::
* clutter/egl/clutter-stage-egl.c:
Fix edpy usage (thanks to Kaj Gronholm).
* clutter/clutter-backend.c:
* clutter/clutter-backend.h:
* clutter/glx/clutter-stage-glx.c:
* clutter/glx/clutter-backend-glx.c:
Fix up rendering pipeline removing clutter_backend_XXX_stage_paint
and adding clutter_backend_XXX_redraw instead. Duplicates less
code in backends, avoids clutter_actor_paint() getting called
before stage is set up (viewport wise) and unbreaks things like
picking.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
* clutter/clutter-main.c:
* clutter/clutter-private.h:
* clutter/clutter-stage.c: (clutter_stage_get_actor_at_pos):
Redo picking functionality a different way (via color indexing)
as to provide more flexibility, possibly speed and more likely
work with GL/ES (doesn't currently however - not sure why).
* clutter/clutter-group.c:
Add groups own 'pick' method.
* clutter/cogl/cogl.h:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl.c:
Move clipping funtionality into cogl.
* clutter/cogl/gles/cogl-defines.h:
Hack around missing BGR format in GL/ES.
* clutter/egl/clutter-backend-egl.c:
* clutter/egl/clutter-backend-egl.h:
* clutter/egl/clutter-stage-egl.c:
* clutter/sdl/clutter-backend-sdl.c:
* clutter/sdl/clutter-backend-sdl.h:
* clutter/sdl/clutter-event-sdl.c:
* clutter/sdl/clutter-stage-sdl.c:
Update backends to newer API.
Add basic mouse event translation to SDL.
* clutter/clutter-actor.c:
* clutter/cogl/gles/cogl.c:
Fix rotation + other fixed point cleanups.
* clutter/clutter-texture.h:
Sketch out an updated API.
* clutter/clutter-rectangle.c:
Comment out color match check for now as appears to be causing
borders to always get pained.
* clutter/clutter-texture.h:
Add some format defines (unused as yet)
* clutter/cogl/gles/cogl.c:
* clutter/egl/clutter-stage-egl.c:
* configure.ac:
Various OpenGL ES backend related fixes and tweaks.
* clutter/Makefile.am:
* clutter/clutter-debug.h:
* clutter/clutter-fixed.h:
* clutter/clutter-main.c:
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl-defines.h:
* clutter/cogl/gles/cogl.c:
* clutter/egl/clutter-backend-egl.c:
* clutter/egl/clutter-backend-egl.h:
* clutter/egl/clutter-stage-egl.c:
* configure.ac:
Populate most stubs for cogl GL/ES implementation.
(against vincent - see http://svn.o-hand.com/repos/misc/ogles)
Add various fixups to EGL backend.
Code builds and runs (on 16bpp) but yet displays much (is close!)
* clutter/pango/pangoclutter-render.c:
comment out some rouge glBegin/end calls.
* clutter/Makefile.am:
* clutter/clutter-actor.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-stage.c:
* clutter/clutter-texture.c:
* clutter/cogl/cogl.h:
* clutter/cogl/gl/Makefile.am:
* clutter/cogl/gl/cogl-defines.h:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl-defines.h:
* clutter/cogl/gles/cogl.c:
* clutter/glx/Makefile.am:
* clutter/glx/clutter-stage-glx.c:
* clutter/pango/Makefile.am:
* clutter/pango/pangoclutter-render.c:
* configure.ac:
Add initial 'cogl' implementation. 'cogl' is a simple abstration
layer over GL and GL/ES used by clutter internally. It should
eventually allow clutter applications to be run on both GL and GL/ES
with just a recompile as well as provide more debugging and potentially
profiling information for GL and GL/ES usage.
This commit contains the initial GL implementation.
* clutter/cogl/Makefile.am:
* clutter/cogl/cogl.h:
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl.c:
Begin poplulating cogl GLES code.
* configure.ac:
* clutter/egl/clutter-event-egl.c:
* clutter/egl/clutter-stage-egl.c:
* clutter/egl/clutter-stage-egl.h:
* clutter/egl/clutter-backend-egl.c:
* clutter/egl/clutter-backend-egl.h:
* clutter/egl/clutter-egl.h:
Add initial EGL/X backend work mostly ported from backend branch.
Builds but untested as yet.
* clutter/glx/clutter-stage-glx.c:
Only include XFixes Header if we have have it.
* clutter/clutter-behaviour.c: (clutter_behaviour_apply):
* clutter/clutter-behaviour.h:
Add clutter_behaviour_is_applied()