Go to file
Neil Roberts 5334547c00 cogland: Update to the Wayland 1.0 API
This updates Cogland example compositor to use the stable Wayland 1.0
API.

• When the client attaches a new buffer to a surface it is now added
  to a struct contaning pending the state instead of immediately
  switching to the new buffer. This state is then flushed when the
  surface is committed.

• The frame callbacks are now queued in a pending list and only added
  to the compositor's main list when the surface is committed. Both
  lists are now a wl_list instead of a GQueue because it makes it
  easier to remove the callback without knowing which list it is in.

• When the buffer is destroyed for a surface the resource for the
  buffer is now sent a release event.

• It now flushes the clients in the prepare for the for the Wayland
  event GSource. This is part of the multi-threaded API in this
  Wayland patch:

  http://cgit.freedesktop.org/wayland/wayland/commit/?id=53d24713a31d59

• Implements a dummy wl_region interface. The only interfaces that
  actually use regions (the opaque and input regions) are ignored but
  we need the interface to create a resource.

• Most the of the SHM interface is now implemented directly in
  libwayland-server except that it still needs to copy the data to the
  subregion of the texture when the damage region is committed.

• The callback list for when a resource is destroyed has been unified
  into a generic wl_signal implementation so the signature for the
  functions has been changed.

  http://cgit.freedesktop.org/wayland/wayland/commit/?h=6802eaa68af9022

• The wl_buffer struct no longer has a user_data parameter so we can't
  attach our own CoglandBuffer data to it. Instead the CoglandSurface
  now just keeps track of the wl_buffer directly.

• The Cogland example is now unconditionally built instead of checking
  the Wayland version number in the configure script. It looks like
  this check was broken anyway because it was checking the version of
  the gbm package rather than a Wayland package.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 4cbbc0f8e3de1fd44dee08b487f1c3f97dda8ede)

Conflicts:
	examples/Makefile.am
	examples/cogland.c
2013-03-22 00:13:32 +00:00
build Update Visual Studio Project Files 2013-03-07 11:37:32 +08:00
cogl Fix multiple snippet interleaving bug 2013-03-20 14:37:58 +00:00
cogl-gles2 build: update to build with automake 1.13 2013-01-22 18:00:05 +00:00
cogl-pango cogl-pango: Add a missing backslash in the Makefile 2013-02-20 14:55:44 +00:00
deps build: fix make dist 2013-01-22 17:48:03 +00:00
doc doc: Add _add/remove_frame_callback api to -sections.txt 2013-02-15 17:44:18 +00:00
examples cogland: Update to the Wayland 1.0 API 2013-03-22 00:13:32 +00:00
po Updated Uyghur translation 2013-03-17 13:41:00 +09:00
tests Prune redundant pipeline ancestry after adding a layer difference 2013-03-19 17:53:43 +00:00
.gitignore build: Allow to build cogl without an external glib dependency 2013-01-22 17:47:58 +00:00
.vimrc misc: Add a .vimrc file 2011-05-17 15:24:54 +01:00
autogen.sh build: update to build with automake 1.13 2013-01-22 18:00:05 +00:00
ChangeLog dist: Don't use elaborate script to gen Changelogs 2011-07-20 16:58:46 +01:00
cogl.doap Adds an initial cogl.doap file 2011-05-06 12:12:13 +01:00
config-custom.h configure: Force #undef of 'near' and 'far' on Windows 2011-06-14 12:14:02 +01:00
config.h.win32.in Update config.h.win32.in 2013-03-15 00:26:35 +08:00
configure.ac cogland: Update to the Wayland 1.0 API 2013-03-22 00:13:32 +00:00
COPYING Update the COPYING file 2011-09-05 19:02:05 +01:00
Makefile.am build: Allow to build cogl without an external glib dependency 2013-01-22 17:47:58 +00:00
NEWS Updates NEWS for the 1.13.4 release 2013-02-21 15:36:59 +00:00
README.in docs: Update pointers to documentation 2012-09-03 15:55:14 +01:00

README for Cogl @COGL_1_VERSION@
===============================================================================

Note: This file is delimited with -- markers so it is possible to split
sections out for other purposes, such as for release notes.

--
DESCRIPTION
-------------------------------------------------------------------------------

Cogl is a small open source library for using 3D graphics hardware for
rendering. The API departs from the flat state machine style of OpenGL and is
designed to make it easy to write orthogonal components that can render without
stepping on each others toes.

As well as aiming for a nice API, we think having a single library as opposed
to an API specification like OpenGL has a few advantages too; like being
able to paper over the inconsistencies/bugs of different OpenGL
implementations in a centralized place, not to mention the myriad of OpenGL
extensions. It also means we are in a better position to provide utility
APIs that help software developers since they only need to be implemented
once and there is no risk of inconsistency between implementations.

Having other backends, besides OpenGL, such as drm, Gallium or D3D are
options we are interested in for the future.

--
REQUIREMENTS
-------------------------------------------------------------------------------

Cogl currently only requires:

  • GLib ≥ @GLIB_REQ_VERSION@
  • OpenGL ≥ 1.3 (or 1.2 + multitexturing), or OpenGL ES 2.0 (or 1.1)
  • GLX, AGL, WGL or an EGL implementation

Cogl also has optional dependencies:

  • GDK-Pixbuf ≥ @GDK_PIXBUF_REQ_VERSION@
     - for image loading
  • Cairo ≥ @CAIRO_REQ_VERSION@
     - for debugging texture atlasing (debug builds only)

The optional Cogl Pango library requires:
  • Cairo ≥ @CAIRO_REQ_VERSION@
  • PangoCairo ≥ @PANGOCAIRO_REQ_VERSION@

On X11, Cogl depends on the following extensions

  • XComposite ≥ @XCOMPOSITE_REQ_VERSION@
  • XDamage
  • XExt
  • XFixes ≥ @XFIXES_REQ_VERSION@

When running with OpenGL, Cogl requires at least version 1.3
or 1.2 with the multitexturing extension. However to build Cogl
you will need the latest GL headers which can be obtained from:

  http://www.khronos.org

If you are building the API reference you will also need:

  • GTK-Doc ≥ @GTK_DOC_REQ_VERSION@

If you are building the additional documentation you will also need:

  • xsltproc
  • jw (optional, for generating PDFs)

If you are building the Introspection data you will also need:

  • GObject-Introspection ≥ @GI_REQ_VERSION@

GObject-Introspection is available from:

  git://git.gnome.org/gobject-introspection

If you want support for profiling Cogl you will also need:

  • UProf ≥ @UPROF_REQ_VERSION@

UProf is available from:

  git://github.com/rib/UProf.git

--
DOCUMENTATION
-------------------------------------------------------------------------------

The 1.x stable API is documented here:

  http://developer.gnome.org/cogl/stable/

The 1.x development API is documented here:

  http://developer.gnome.org/cogl/1.$(COGL_1_MINOR_VERSION)

The experimental 2.0 API is currently not hosted online but can be built
by passing the --enable-gtk-doc option to ./configure when building
and the documentation can then be found under
doc/reference/cogl-2.0-experimental/html/index.html

--
LICENSE
-------------------------------------------------------------------------------

Most of Cogl is licensed under the terms of the GNU Lesser General Public
License, version 2.1 or (at your option) later. Some files are licensed under
more permissive licenses MIT or BSD style licenses though so please see
individual files for details.

--
BUILDING AND INSTALLATION
-------------------------------------------------------------------------------

Please refer to the INSTALL document.

--
BUGS
-------------------------------------------------------------------------------

Please report bugs here:

  http://bugzilla.gnome.org/enter_bug.cgi?product=cogl

You will need a Bugzilla account.

Please include the following in bug reports:

  • what system you're running Cogl on;
  • which version of Cogl you are using;
  • which version of GLib and OpenGL (or OpenGL ES) you are using;
  • which video card and which drivers you are using, including output of
    glxinfo and xdpyinfo (if applicable);
  • how to reproduce the bug.

If you cannot reproduce the bug with one of the tests that come with
Cogl's source code, it can help a lot to include a small test case
displaying the bad behaviour.

If the bug exposes a crash, the exact text printed out and a stack trace
obtained using gdb are greatly appreciated.

--
CONTRIBUTING
-------------------------------------------------------------------------------

The CODING_STYLE file describes the coding style we use throughout Cogl,
please try your best to conform to this style because the consistency
really helps keep the code maintainable.

We can accept contributions in several ways:
  • Either as patches attached to bugs on bugzilla
      - For this you may be interested in using git-bz.

        See http://git.fishsoup.net/man/git-bz.html for details
  • You can email us patches
      - For this we recommend using git-send-email

  • You can create a remote branch and ask us to pull from that for more
    substantial changes.
      - For this we recommend using github.

Ideally standalone patches should be created using git format-patch since
that makes it easiest to import the patch with a commit message into a
git repository.