Commit Graph

3291 Commits

Author SHA1 Message Date
Robert Bragg
70ca3bfe41 [cogl] remove unused gles/cogl-utils.[c,h]
The only function in gles/cogl-utils.c was cogl_util_next_p2() and it's
redundant since we also have a cogl/cogl-utils.[c,h]
2009-11-24 17:58:22 +00:00
Robert Bragg
4a63af0c63 docs: Don't document cogl_flush_gl_state as public API
This function was #if 0'd before we released Clutter 1.0 so there's no
implementation of it.  At some point we thought it might assist with
developers breaking out into raw OpenGL.  Breaking out to raw GL is a
difficult problem though so we decided instead we will wait for a specific
use case to arrise before trying to support it.
2009-11-24 17:58:22 +00:00
Emmanuele Bassi
328ce370e7 animation: Keep a weak reference on actors
Actors, unlike objects, can effectively go away whilst being
animated - usually because of an explicit destoy().

The Animation created by clutter_actor_animate() and friends
should keep a weak reference on the actor and eventually
get rid of the animation itself in case the actor goes away
whilst being animated.
2009-11-24 16:59:24 +00:00
Neil Roberts
1107fa8797 Minor fix to cogl material
_cogl_material_get_layer expects a CoglMaterial* pointer but it was
being called with a CoglHandle. This doesn't matter because the
CoglHandle is actually just the CoglMaterial* pointer anyway but it
breaks the ability to change the _cogl_material_pointer_from_handle
macro.
2009-11-23 18:36:59 +00:00
Emmanuele Bassi
6fd80ffbd9 docs: Add indices to the Cogl API reference
The Clutter API reference has an index of the symbols for each minor
version, and a list of deprecated symbols. The Cogl API reference
should have the same layout.
2009-11-19 14:30:01 +00:00
Emmanuele Bassi
8d64c4641d docs: Increase consistency in Cogl documentation 2009-11-19 14:19:59 +00:00
Emmanuele Bassi
550c14449e docs: Documentation fixes for CoglMatrix
Clean up the references, the docbook tags, and the style to fit in
with the rest of the API references for Cogl and Clutter.
2009-11-19 13:56:47 +00:00
Emmanuele Bassi
056cfcffc3 Whitespace fix for cogl-color.h 2009-11-19 13:56:47 +00:00
Emmanuele Bassi
851d628cf8 docs: Documentation fixes for CoglMaterial
Clean up the references, the docbook tags, and the style to fit in
with the rest of the API references for Cogl and Clutter.
2009-11-19 13:56:47 +00:00
Emmanuele Bassi
fe804f1d02 docs: Documentation fixes for CoglBitmap
• Use the same style for the Cogl API reference as the one used for
  the Clutter API reference.

• Fix the introspection annotations for cogl_bitmap_get_size_from_file()
2009-11-19 13:56:47 +00:00
Emmanuele Bassi
1bf8db9e75 docs: Fix Cogl API reference build
• Ignore all the private header files

• Add all missing/unused symbols

• Remove deprecated symbols from 0.*
2009-11-19 13:56:42 +00:00
Emmanuele Bassi
05a5a7e759 docs: Remove non-gtk-doc annotations
The imported Mesa matrix code has some documentation annotations
that make gtk-doc very angry. Since it's all private anyway we
can safely make gtk-doc ignore the offending stuff.
2009-11-19 13:55:46 +00:00
Neil Roberts
7a011af974 docs: Fix the 'Since' annotation for some functions
The 'Since' annotation needs to have a colon after it or gtk-doc won't
pick it up.
2009-11-19 11:51:21 +00:00
Neil Roberts
8ef57898ad cogl: Use APIENTRY for GL function pointer declarations
This matters for platforms such as Windows that use a different
calling covention from the default for GL functions.
2009-11-18 19:24:09 +00:00
Neil Roberts
be58e5261f build: Fix out-of-tree builds for cogl-defines.h
$(COGL_DRIVER)/cogl-defines.h is generated in the configure script so
it ends up in the build directory. Therefore the build rule for
cogl/cogl-defines.h should depend on the file in $(builddir) not
$(srcdir).
2009-11-18 19:24:09 +00:00
Emmanuele Bassi
19e485325f docs: Clean up deprecation notices
The deprecation notices in gtk-doc should also refer to the
release that added the deprecation, and if the deprecated
symbol has been replaced by something else then the new symbol
should be correctly referenced.
2009-11-18 18:04:13 +00:00
Emmanuele Bassi
5f28c8b654 build: Make cogl.h not conditional on driver defines
The main COGL header cogl.h is currently created at configure time
because it conditionally includes the driver-dependent defines. This
sometimes leads to a stale cogl.h with old definitions which can
break the build until you clean out the whole tree and start from
scratch.

We can generate a stable cogl-defines.h at build time from the
equivalent driver-dependent header and let cogl.h include that
file instead.
2009-11-18 17:49:21 +00:00
Neil Roberts
b869e87c86 test-npot-texture: Add some verbose notes
This just adds some verbose output stating whether Cogl thinks that
NPOT textures are supported.
2009-11-18 17:28:08 +00:00
Neil Roberts
8f1edcb6ed disable-npots: Don't allow the GL version to be 2.0
Cogl now assumes non-power-of-two textures are supported if the GL
version is >= 2.0 so the disable-npots utility should also change the
GL version.
2009-11-18 17:28:08 +00:00
Emmanuele Bassi
e80030755e build: Fix EXTRA_DIST and MAINTAINERCLEANFILES rules 2009-11-18 15:21:09 +00:00
Emmanuele Bassi
ed4f0beac9 Update README file 2009-11-18 15:11:56 +00:00
Emmanuele Bassi
44f926556d docs: Update the "writing a backend" documentation
The documentation on how a ClutterBackend and stage are implemented
is a wee bit out of date.
2009-11-18 15:06:37 +00:00
Emmanuele Bassi
f8e4e67272 Remove clutter.symbols
The symbols file is unused since Clutter 0.6, and the win32 backend
does not depend on it anymore.
2009-11-18 14:56:59 +00:00
Emmanuele Bassi
a4f1d1d6cc Rename ChangeLog.SVN 2009-11-18 14:56:25 +00:00
Emmanuele Bassi
60fae6a92e build: Add cogl-matrix-private.h to the dist 2009-11-18 14:43:46 +00:00
Emmanuele Bassi
425f3b4660 build: Add cogl-feature-functions.h to the dist 2009-11-18 14:43:46 +00:00
Emmanuele Bassi
d11343532d build: Generate per-cycle ChangeLog files
We should generate a ChangeLog for each minor version cycle, starting
from the Git import date (since before that we used ChangeLog-style
commit messages that don't really look good with the Git ones).

For this reason we can take Cairo's Makefile.am.changelog file and,
after tweaking it to fit our use case, let it generate the correct
ChangeLogs on dist.
2009-11-18 14:43:46 +00:00
Emmanuele Bassi
18e9d0db6f build: Move ChangeLog rules in a separate file
The ChangeLog creation rules should be moved to their own file, to
make it easier to fix or change them in the future.
2009-11-18 14:43:46 +00:00
Neil Roberts
142305b1d5 cogl: Add the missing terminators for the arrays of feature functions
_cogl_feature_check expects the array of function names to be
terminated with a NULL pointer but I forgot to add this. This was
causing crashes depending on what happened to be in memory after the
array.
2009-11-18 13:23:10 +00:00
Christian Persch
70aeb1c642 Pass the interned string value to the binding callback
http://bugzilla.openedhand.com/show_bug.cgi?id=1891

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-11-17 21:32:17 +00:00
Neil Roberts
2832940603 cogl: Use the GL_EXT_blend_{func,equation}_separate extensions
We should use these extensions to check for glBlendFuncSeparate and
glBlendEquationSeparate as well as checking the GL version number.
2009-11-17 18:06:31 +00:00
Neil Roberts
6e0877507e cogl: Don't bother checking for NPOTs or VBOs on later GLs
For VBOs, we don't need to check for the extension if the GL version
is greater than 1.5. Non-power-of-two textures are given in 2.0.

We could also assume shader support in GL 2.0 except that the function
names are different from those in the extension so it wouldn't work
well with the current mechanism.
2009-11-17 17:22:22 +00:00
Emmanuele Bassi
4a8c1ff8fa build: Clean up the configure summary
Split out into section the configuration report, and clean
up the reported settings - including when experimental features
have been enabled.
2009-11-17 15:34:00 +00:00
Neil Roberts
91cde78a70 cogl: Make it easier to add checks for GL extensions
Previously if you need to depend on a new GL feature you had to:

- Add typedefs for all of the functions in cogl-defines.h.in

- Add function pointers for each of the functions in
  cogl-context-driver.h

- Add an initializer for the function pointers in
  cogl-context-driver.c

- Add a check for the extension and all of the functions in
  cogl_features_init. If the extension is available under multiple
  names then you have to duplicate the checks.

This is quite tedious and error prone. This patch moves all of the
features and their functions into a list of macro invocations in
cogl-feature-functions.h. The macros can be redefined to implement all
of the above tasks from the same header.

The features are described in a struct with a pointer to a table of
functions. A new function takes the feature description from this
struct and checks for its availability. The feature can take a list of
extension names with a list of alternate namespaces (such as "EXT" or
"ARB"). It can also detect the feature from a particular version of
GL.

The typedefs are now gone and instead the function pointer in the Cogl
context just directly contains the type.

Some of the functions in the context were previously declared with the
'ARB' extension. This has been removed so that now all the functions
have no suffix. This makes more sense when the extension could
potentially be merged into GL core as well.
2009-11-17 15:11:26 +00:00
Emmanuele Bassi
4734b7be41 docs: Detail the Clutter debugging flags 2009-11-14 13:03:59 +00:00
Neil Roberts
037192552e win32: Remove the check for GL 1.2
Since 568c29ba4 the GL version is now validated further up in
ClutterStage via Cogl so there is no need for the Win32 backend to do
it.
2009-11-13 17:23:13 +00:00
Neil Roberts
62a37d8e53 Use the GL_ARB_multitexture extension on GL 1.2
Cogl requires multi-texturing support. This is only available as an
extension in GL 1.2 so we should check for it before accepting the
driver.

http://bugzilla.openedhand.com/show_bug.cgi?id=1875
2009-11-13 15:56:01 +00:00
Neil Roberts
2e99b276a4 cogl-material: Fallback to BlendFunc if BlendFuncSeparate is unavailable
glBlendFuncSeparate is only available in OpenGL 1.4. If we
conditionally check for this then Clutter will work with OpenGL 1.2.

http://bugzilla.openedhand.com/show_bug.cgi?id=1875
2009-11-13 15:55:55 +00:00
Neil Roberts
568c29ba49 Validate that the GL version is >= 1.2
There is a new internal Cogl function called _cogl_check_driver_valid
which looks at the value of the GL_VERSION string to determine whether
the driver is supported. Clutter now calls this after the stage is
realized. If it fails then the stage is marked as unrealized and a
warning is shown.

_cogl_features_init now also checks the version number before getting
the function pointers for glBlendFuncSeparate and
glBlendEquationSeparate. It is not safe to just check for the presence
of the functions because some drivers may define the function without
fully implementing the spec.

The GLES version of _cogl_check_driver_valid just always returns TRUE
because there are no version requirements yet.

Eventually the function could also check for mandatory extensions if
there were any.

http://bugzilla.openedhand.com/show_bug.cgi?id=1875
2009-11-13 15:55:48 +00:00
Samuel Degrande
677ff9fb30 Can no more include clutter-stage.h inside clutter-win32.h
http://bugzilla.openedhand.com/show_bug.cgi?id=1847

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2009-11-13 15:50:01 +00:00
Samuel Degrande
26ce94eda0 Adapt win32 backend to the semantic change of StageWindow
http://bugzilla.openedhand.com/show_bug.cgi?id=1847

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2009-11-13 15:50:00 +00:00
Emmanuele Bassi
b69ee0989b tests: Add instructions to test-box-layout 2009-11-13 15:35:11 +00:00
Neil Roberts
568ad044eb Clear pending events for a stage when it is destroyed
We can not process events for a stage that has been destroyed so we
should make sure that the events for the stage are removed from the
global event queue during dispose.

http://bugzilla.openedhand.com/show_bug.cgi?id=1882
2009-11-13 15:27:38 +00:00
Emmanuele Bassi
49cd887aab docs: Document the AnimationMode definition
Both ClutterAlpha:mode and ClutterAnimation:mode can be defined using:

  • an integer id
  • the "nick" field of the AnimationMode GEnumValue
  • a custom, tweener-like string

All these methods should be documented.
2009-11-13 15:01:17 +00:00
Emmanuele Bassi
c8d5703788 tests: Add unit for Animation definitions
Verify that an Animation can be defined using ClutterScript.

No initial/final state of the animation, yet.
2009-11-13 15:01:17 +00:00
Emmanuele Bassi
d54f4e944c Whitespace fixes 2009-11-13 15:01:17 +00:00
Emmanuele Bassi
95b55588ad tests: Print out parser errors if present
If the conformance test for the Script parser throws an error
and we've enabled verbosity then we should print out the error
message before aborting.
2009-11-13 15:01:17 +00:00
Emmanuele Bassi
9bae553564 animation: Override parsing :mode
Like in ClutterAlpha, ClutterAnimation:mode must be overridden when
parsing a Script definition, as we accept both a numeric id and the
string id for easing modes.
2009-11-13 15:01:17 +00:00
Neil Roberts
dab1da20ae [cogl-primitives] Don't clear the whole stencil buffer
When _cogl_add_path_to_stencil_buffer is used to draw a path we don't
need to clear the entire stencil buffer. Instead it can clear just the
bounding box of the path. This adds an extra parameter called
'need_clear' which is only set if the stencil buffer is being used for
clipping.

http://bugzilla.openedhand.com/show_bug.cgi?id=1829
2009-11-13 10:51:47 +00:00
Neil Roberts
bc8faf52f4 Remove _cogl_flush_matrix_stacks from cogl-internal.h
The definition for this function was removed in f7d64e5abvoid so it
should be removed from the header too.
2009-11-12 17:01:44 +00:00