Another list to maintain by hand. We could split the variables declaring
the source files into private and public header in a separate Makefile
and then include it from both doc/reference/cogl/Makefile and
cogl/Makefile, but I'll leave this for the next person to look at the
documentation.
(cherry picked from commit f2daeb45fe118b848fbb2ad755d632d5699cd98b)
gtk-doc is not smart enough to parse things like:
typedef struct
{
...
} CoglFoo;
but needs the '{' at the end of the first line.
(cherry picked from commit d1187550ef547305fdeb8a22a7e39a95611a0e1d)
gtk-doc needs the types in -sections.txt to be able to do
cross-references. Add all those currently generating warnings.
(cherry picked from commit e57a21d2608f0885e6f2eb3a017feb7dffb7a63c)
That's actually for signals in gtk-doc and we're not dealing with
GObjects so it's not really appropriate. Used <structfield> as it's the
closest tag I could find to describe a 'property' of a CoglObject and
gives a generic style in the produced HTML.
(cherry picked from commit 8b485d57577cff227a0c7a2e6c06d8d277821374)
I just added the general types creating warnings in the current state of the
documentation (ie the ones references by already documented functions)
and moved the section from the 'Utility' section to the 'General'
section which I believe is a better fit as they are used by more than
one type and not really utilities.
(cherry picked from commit c51b147789763863ef32482d7ffa936160ed7c93)
Various changes have led to the current, separate from the pipeline,
depth state, this commit fixes the remaining waring around that.
(cherry picked from commit 111e687e722ad67a0e1c09f881c6282ccb06410b)
Instead of just having the reference at the end of the paragraph.
Usually seen as more usable.
(cherry picked from commit 6988d3ae61ab16fb298b34d2bd31860833f04186)
Argument names and @$arg suffered from various little mismatches, fix
them in a batch commit.
(cherry picked from commit d2ac3c5a88d980e7519c98bd261111b93cf73a6e)
Types need to be declare to be cross-referenceable. Use the opportunity
to reorganise the symbols in subsections.
(cherry picked from commit 95be47bc2aeea208c28d7df0b82aa63cc132f71e)
cogl-index-range was the old API, update the section name to match what
is declared in the documentation. Also update the short description to
better match the new API.
(cherry picked from commit d73df38ff2a8ebe477e139e5ac20838c8f4364bb)
Of course, each time one has to maintain a list of files by hand, it
tends to get out of synch. No exception here. Try to be slightly more
cunning and compute the list automatically.
(cherry picked from commit 10de693b69851497fa7b3238622b6502406c70dd)
2 Things seems to mixed at the top level here. General APIs that work
throughout the library and the context object. Let's split the sections
in two then.
(cherry picked from commit 5f72fb9ffec33213ff1089ce786a9b2e4c4c513f)
Looks more logical than a top level section on its own and at the top of
the documentation.
(cherry picked from commit a3b1cd7f7dad3ec29fa5d9d53b155040916a5454)
gtk-doc complains that having a sentence starting by Return is a bit
ambiguous and it'd rather see 'Returns:' spelled out.
Fixes 2 warnings:
warning: Free-form return value description in $symbol. Use `Returns:'
to avoid ambiguities
(cherry picked from commit 9718f31717b3a0e01b7c4c69cea138f39d23c0e0)
This allows us to catch the use of undefined macros (that default to 0)
in preprocessor conditionals.
(cherry picked from commit 53ddc20fe9cd1400d18274e521932f84a4aecc5b)
Some variables (notably multiline ones) are not really supposed to be
substituted by automake. Let's take COGL_DEFINES for instance, you get:
COGL_DEFINES =
#define COGL_HAS_GLIB_SUPPORT
#define COGL_HAS_GTYPE_SUPPORT
#define COGL_HAS_GL
#define CLUTTER_COGL_HAS_GL
#define COGL_HAS_GLX_SUPPORT
#define COGL_HAS_SDL
...
This only works because the '#' character makes it look like a comment
and COGL_DEFINES becomes an empty variable
Automake allows to exclude variables from the list of substitutions,
let's use it for those two.
(cherry picked from commit e0a9d8d775c90c60b6e63b52771e896da3641a40)
COGL_HAS_* and COGL_ENABLE_DEBUG are either defined in config.h or not.
So let's test against this, not against their truth value, this allow us
to use -Wundef to catch undefined macros in preprocessor directives.
(cherry picked from commit 73b62832f24711073b0876a6c0f5c61727842c1c)
Cogl always needs to have the context bound to something so that it
can freely create resources such as textures even if there is no
current window. When the currently bound SDLWindow is destroyed, SDL
apparently explicitly unbinds the GL context. If something then later
for example tries to create a texture Cogl would start getting GL
errors and fail. To fix this the SDL winsys now just binds the dummy
window before deiniting the currently bound onscreen.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 2c0cfdefbb9d1ac5097d98887d3581b67a324fae)
We have found several times now when writing code using Cogl that it
would really help if Cogl's matrix stack api was public as a utility
api. In Rig for example we want to avoid redundant arithmetic when
deriving the matrices of entities used to render and we aren't able
to simply use the framebuffer's matrix stack to achieve this. Also when
implementing cairo-cogl we found that it would be really useful if we
could have a matrix stack utility api.
(cherry picked from commit d17a01fd935d88fab96fe6cc0b906c84026c0067)
At times there can be huge numbers of CoglMatrixEntry structures
allocated if they are being used to track the transform of many drawing
commands or objects in a scenegraph. Therefore the size of a
CoglMatrixEntry should be kept as small as possible both to help reduce
the memory usage of applications but also to improve cache usage since
matrix stack manipulations are performance critical at times.
This reduces the size of CoglMatrixEntry structures for non-debug builds
by removing the composite_gets counter used to sanity check how often
the transform for an entry is resolved.
(cherry picked from commit c400b86681a328b1e12b7e120e9c3f4f12c356e0)
This moves the parent pointer member to the top of the CoglMatrixEntry
structure since it will lead to wasted padding when we build for 64bit
cpus.
(cherry picked from commit 42b4750070286a6404b103d8a827a46efb6b344c)
When unrefing a CoglMatrixEntry we walk up the ancestry unrefing and
freeing entries until we find an entry that doesn't need to be freed.
The problem fixed by this patch was that we didn't dereference the
parent member of each entry until after the entry was freed and so there
was the potential for reading a junk parent pointer back.
(cherry picked from commit e5d836b84acb35a009854a0cc0892320023789d1)
It is considered an error to pass a NULL data pointer to
cogl_attribute_buffer_new so we now call
cogl_attribute_buffer_new_with_size instead.
(cherry picked from commit 8e201574b9c35847aa4e999a391741538a0b356b)
Both the texture drivers weren't handling errors correctly when a
CoglPixelBuffer was used to set the contents of an entire texture.
This was causing it to hit an assertion failure in the pixel buffer
tests.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 888733d3c3b24080d2f136cedb3876a41312e4cf)
test-pixel-buffer previously had two tests, one to check filling the
pixel buffer by mapping it and another to fill it by just setting the
data. These tests were set up in a kind of confusing way where it
would try to paint both steps and then validate them together using
colors looked up from a table. This patch separates out the two tests
and gets rid of the tables which hopefully makes them a bit easier to
follow.
The contents of the bitmap are now set to an image with has a
different colour for each of its four quadrants instead of just a
single colour in the hope that this will be a bit more of an extensive
test.
The old code had a third test that was commented out. This test has
been removed.
The textures are now created using cogl_texture_2d_new_* which means
they won't be in the atlas. This exposes a bug where setting the
entire contents of the texture won't handle errors properly and it
will hit an assertion. The previous code using the atlas would end up
only setting a sub-region of the larger atlas texture so the bug
wouldn't be hit. To make sure we still test this code path there is
now a third test which explicitly sets a sub-region of the texture
using the bitmap.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 8beb3a4cc20f539a50645166485b95e8e5b25779)
This ports the test-texture-get-set-data clutter test to be a standalone
Cogl test.
(cherry picked from commit 40defa3dbd355754d0f7611d3c50de35db514e4a)