| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This adds a cogl-win32-renderer.h for the win32 specific cogl-renderer
API instead of having #ifdef guards in cogl-renderer.h
|
|
|
|
|
| |
This updates the public wayland symbols to follow the pattern
cogl_wayland_blah instead of cogl_blah_wayland.
|
|
|
|
|
|
|
|
|
|
|
| |
we've got into a bit of a mess with how we name platform specific
symbols and files, so this is a first pass at trying to tidy that up.
All platform specific symbols should be named like
cogl_<platform>_symbol_name and similarly files should be named like
cogl-<platform>-filename.c
This patch tackles the X11 specific renderer/display APIs as a start.
|
|
|
|
|
|
|
| |
This adds Xlib and Win32 typesafe replacements for
cogl_renderer_handle_native_event, cogl_renderer_add_native_filter,
cogl_renderer_remove_native_filter. The old functions are kept as an
implementation detail so we can share code.
|
|
|
|
|
|
|
|
|
| |
It used to be that we passed around NULL terminated arrays of
attributes, but since 3c1e83c7f we now explicitly pass an n_attributes
count instead. There were some leftovers of the old approach in the
cogl_vdraw_[indexed]_attributes functions and also there was an
off-by-one error with the n_attributes values passed on which was
causing crashes.
|
|
|
|
|
|
|
|
|
| |
When setting a NULL texture on a CoglPipeline we would also reset the
texture target to a dummy value of 0. Reseting the target also had the
effect of making fragends discard any associated program. In cases where
the NULL texture was only transient until a replacement texture could be
set we were re-running lots of redundant codegen and shader
compilations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We encourage developers to create template pipelines that we can
associated re-usable state such as shaders with, but our logic for
pruning redundant ancestry was actually pruning those templates!
We now keep track of which pipelines are created for internal purposes
(e.g. copy-on-write pipelines created when modifying an immutable
pipeline referenced in the journal) and we only ever prune those. We no
longer prune user created pipelines.
We are careful to consider that pipelines that are initially created
explicitly by the user, might eventually become internal only. This
is true if the ref_count of a pipeline is equal to the number of
children it has, since we know the application no longer owns a
reference to the pipeline. In this situation we will allow pruning.
NB: The main reason we need to do pruning is to consider cases where
the user toggles back and fourth between the same states and we need to
avoid creating an endlessly growing chain
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a documented rule that layer changes should only be notified to
the fragend once; either as a pipeline change or as a layer change. When
the number of layers associated with a material changes then that should
get notified against the pipeline. All other layer changes get notified
against the layer.
There was a mistake in the _cogl_pipeline_add/remove_layer_difference
functions, in that we weren't using the 'inc/dec_n_layers' boolean to
determine if the fragend should be notified of the change.
It was also noticed that the logic of _cogl_pipeline_prune_to_n_layers
would also break this rule, by failing to notify some changes at all.
|
|
|
|
|
| |
This does some minor gardening in cogl-sections.txt, tweaking some of
the section titles and removing some stale api references.
|
|
|
|
| |
This improves the gtk-doc overview for the CoglBuffer interface.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This adds the cogl_swap_chain and cogl_onscreen_template symbols to the
experimental 2.0 reference manual.
|
|
|
|
| |
Adds the cogl_display symbols to the experimental 2.0 reference manual.
|
|
|
|
|
| |
This lists the cogl_renderer symbols in the cogl-sections.txt for the
experimental 2.0 reference manual.
|
|
|
|
|
|
|
|
|
| |
This adds API to let you override the choice of Cogl's winsys backend.
Previously it was only possible to override the winsys using the
COGL_RENDERER environment variable, but it's useful for something like
Clutter to be able to control the winsys via API without needing
environment variable tricks. This also adds API to query back the
winsys chosen by Cogl, in case you don't set an explicit override.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes experimental cogl_framebuffer APIs for getting and setting
a viewport without having to refer to the implicit CoglContext. It adds
the following experimental API:
cogl_framebuffer_set_viewport
cogl_framebuffer_get_viewport4fv
cogl_framebuffer_get_viewport_x
cogl_framebuffer_get_viewport_y
cogl_framebuffer_get_viewport_width
cogl_framebuffer_get_viewport_height
|
|
|
|
|
| |
Based on the Cogl example we had on wiki.clutter-project.org this shows
how to use the primitive API to draw a simple spinning crate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a _cogl_init function for Cogl that we expect to be the first
thing called before anything else is done with Cogl. It's not a public
API so it's expected that all entry points for Cogl that might be the
first function used should call _cogl_init().
We currently call _cogl_init() in these functions:
cogl_renderer_new
cogl_display_new
cogl_context_new
cogl_android_set_native_window
_cogl_init() can be called multiple times, and only the first call has
any affect.
For example _cogl_init() gives us a place check and parse the COGL_DEBUG
environment variable.
Since we don't have any need to parse command line arguments (we can
always get user configuration options from the environment) our init
function doesn't require argc/argv pointers.
By saying up front that we aren't interested in command line arguments
that means we can avoid the mess that is GOption based library
initialization which is extremely fragile due to its lack of dependency
tracking between modules.
|
|
|
|
|
|
| |
Signed-off-by: Adam Jackson <ajax@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=652672
|
|
|
|
|
| |
To be sure our examples link with all the libraries required, we now
simply pass the $(COGL_DEP_LIBS) as ldflags when linking them.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
So that our released tarballs can contain filenames longer than 99
characters we tell automake to create tarballs using the ustar format.
This is newer than the default v7 format but still old enough to be
considered widely portable.
|
| |
|
|
|
|
|
|
|
|
|
| |
Since gtk-doc is an optional dependency for Cogl then we need to special
case how EXTRA_DIST is initialized. It shouldn't be set when using
gtk-doc since gtk-doc.make expects to initialize EXTRA_DIST. If we
aren't using gtk-doc then it should be initialized to an empty value
instead of including gtk-doc.make so that the later lines that append
various extra png files to EXTRA_DIST won't fail.
|
| |
|
| |
|
| |
|
|
|
|
| |
This adds some notes for maintainers about how to make a Cogl release.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a --enable-profile option which enables uprof based profiling.
It was also necessary to fixup a CLUTTER_ENABLE_PROFILING #ifdef in
cogl-context.c to renamed COGL_ENABLE_PROFILING instead. By default Cogl
doesn't output uprof reports directly, instead it assumes a higher level
toolkit will output a report. If you want a report from Cogl you can
export COGL_PROFILE_OUTPUT_REPORT=1 before running your app.
The latest version of uprof can be fetched from:
git://github.com/rib/UProf.git
|
|
|
|
|
|
| |
This update the x11-foreign test so that it checks for events on its X
display and forwards them on to Cogl. It will now also quit if any key
of button is pressed.
|
|
|
|
|
|
|
| |
This explicitly renames the cogl-2.0 reference manual to
cogl-2.0-experimental and renames the cogl-2.0 pkg-config file to
cogl-2.0-experimental.pc. Hopefully this should avoid
miss-understandings.
|
|
|
|
| |
This adds some convenience rules to help manage releases
|
|
|
|
|
|
| |
The x11-foreign example directly uses the X11 API at it seems that more
recent versions of binutils complain if we don't directly link the test
with libX11 as opposed to relying on indirect linkage via cogl.
|
|
|
|
|
|
|
| |
This reverts commit 3d2564df8f71d6030d9496b7f8e57a27905a4b5a.
Since 01e1260aa the 'near' and 'far' defines are now undef'd on
Windows so we no longer have to remember not to use them in Cogl code.
|
|
|
|
|
|
|
| |
This adds an extra header that gets included from config.h where we
can add configuration defines. This is used to #undef 'near' and 'far'
when building for Windows so that we don't have to avoid using them as
variable names in the Cogl code.
|
|
|
|
|
|
|
|
|
|
| |
This allows to track the number of objects allocated by Cogl. The
results are displayed on the standard output by calling :
cogl_debug_print_instances ();
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
Signed-off-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When validating a user pipeline before drawing with a CoglVertexBuffer
we sometimes find we have to make some overrides and we handle that by
creating a pipeline which is a weak copy of the user pipeline. The weak
pipeline gets associated with the original pipeline so if that pipeline
is used multiple times then we can re-use the same override pipeline and
skip validation. Because it's a weak pipeline we get notified when the
original material is destroyed or changed so we know our weak pipeline
is now invalid.
When we get notified that the weak material is invalid we should unref
it, but instead we were just discarding our reference to it. This was
resulting in leaking weak materials and in some cases those materials
referenced textures which would then also be leaked.
|
|
|
|
|
|
| |
They collide with existing symbols when compiling on Windows.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2667
|
|
|
|
|
|
|
| |
The wrapper for the can_hardware_repeat had a cut and paste error so
it would call the wrong function on the child texture.
Many thanks to Owen Taylor for finding this bug.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When rendering a box for an unknown glyph it would previously just use
the average glyph size for the font. This causes problems because the
size calculations for the layout assume a different size so it can end
up rendering outside of the expected ink rectangle. This patch changes
it to query the size of the glyph in the font. Pango should end up
reporting the size of what would be the hex box which should be the
same as the sized used for the extents calculation.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2599
|
| |
|
|
|
|
|
|
| |
It is going to be deprecated by GLib, see bug:
https://bugzilla.gnome.org/show_bug.cgi?id=644611
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The COGL_DEBUG=disable-texturing debug variable disables texturing in
the fixed function fragend by not bothering to enable the texture
targets. This wasn't working for the programmable fragends because the
texture targets don't need to be enabled to use them. This patch
modifies the two programmable backends to generate a constant value
for the texture lookups in the shader when the debug variable is
given.
|
|
|
|
|
| |
The gobject introspection scanner was failing to find EGL headers so we
now pass the COGL_DEP_CFLAGS to Cogl_1_0_gir_CFLAGS.
|