Skip to content

rib/cogl

Repository files navigation

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.

To understand its relationship to OpenGL it's important to understand
that OpenGL is a collection of API specifications, with different
profiles (E.g. Full OpenGL 2/3/4, Embedded OpenGL ES 1/2/3 and WebGL 1/2)
as well as an unbounded set of vendor specific extension
specifications. It should also be understood that OpenGL can't be used
directly without some platform specific code to initialize it, create
a context and handle presentation. Modern OpenGL is strictly only
concerned with standardising apis for submitting work to a GPU and
avoids specifying any utility apis, such as math utilities, a matrix
stack api or format conversion apis which almost all real-time graphics
software needs in practice.

Cogl provides a single concrete library as opposed to an API
specification. This distinction makes it possible for us to provide an
api that works consistently across multiple OpenGL profiles and
versions; allows us to tame the myriad of vendor extensions (There is
is a lot of redundancy between OpenGL extensions); and enables us to
work around some inconsistencies between different implementations in
one place.

Cogl is designed foremost as a library to support practical real-time
graphics rendering with a GPU.

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

Cogl currently only requires:

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

Cogl also has optional dependencies:

  • GLib ≥ @GLIB_REQ_VERSION@
     - for gtype integration
  • 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@

The optional Cogl GStreamer library requires:

  • GStreamer 1.0

On X11, Cogl depends on the following extensions

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

For the Wayland backend, Cogl requires:
  • Wayland ≥ @WAYLAND_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 documented here:

  http://cogl3d.org/cogl2-reference/

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

Most of Cogl is licensed under the terms of the MIT license.

The tesselator used by cogl-path is under the SGI Free Software License B,
version 2.0 (basically identical to the MIT license except you can choose
to refer to a web address for a copy of the notice in documentation).

cogl-point-in-poly.c is under a permissive 3 clause BSD license.

stb_image.c is public domain.

Please refer to the COPYING file and 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.