* clutter/cogl/common/cogl-clip-stack.h:
* clutter/cogl/common/cogl-clip-stack.c: Added functions to
maintain a stack of clipping rectangles.
* clutter/cogl/gles/cogl.c:
* clutter/cogl/gl/cogl.c: The cogl_clip_set and unset functions
have moved into cogl-clip-stack.c which calls back to cogl.c to
set the actual rectangles. Multiple clip rectangles are combined
by merging the stencil buffers.
* clutter/cogl/gles/cogl-primitives.c (_cogl_path_fill_nodes):
* clutter/cogl/gl/cogl-primitives.c (_cogl_path_fill_nodes): Merge
the stencil buffer with the contents of the clipping stack after
drawing the path.
* clutter/cogl/gles/cogl-context.h (CoglContext):
* clutter/cogl/gl/cogl-context.h (CoglContext): Store the number
of available stencil bits.
* clutter/cogl/common/Makefile.am
(libclutter_cogl_common_la_SOURCES): Added cogl-clip-stack.c
* 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
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).
Defined GL extension functions used by Cogl inside the COGL_
namespace.
* clutter/cogl/gl/cogl-context.h:
* clutter/cogl/gl/cogl.c:
Use COGL_ extension function prototypes instead of relying
on glext.h to define them. Should fix the mac compilability
bug, but haven't tested it yet.
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.