LADI attempts for https://gitlab.gnome.org/GNOME/cogl revival
Go to file
Neil Roberts b35d50001b cogl-gles2-context: Wrap glCopyTex{Sub,}Image2D to flip the result
When the CoglGLES2Context is bound to read from a CoglOffscreen then
the result will be upside down from what GL expects if
glCopyTexImage2D is used directly. To fix that, this patch now wraps
glCopyTexImage2D and glCopyTexSubImage2D so that the copy is doing by
binding an FBO to the target texture and then rendering a quad
sampling from the texture in the offscreen framebuffer.

The rendering is done using the Cogl context rather than the GLES2
context because otherwise it would have to do a fair bit of work to
try and stash the old state on the context before setting up the state
to do the blit. The down side of this is that the contexts need to be
synchronized so that the rendering will be up-to-date. As far as I
understand from the GL spec, this requires a glFinish and then the
texture needs to be rebound in the new context because updates to
shared objects are guaranteed to be reflected until the object is
rebound.

GLES2 supports using glCopyTexImage2D for cube map textures. As Cogl
doesn't currently have support for cube maps, it is quite hard to get
that to work with this patch. For now attempts to copy to a cube map
texture will just be sliently ignored.

This patch also includes a test case which renders an image to the
framebuffer and then copies it to a texture. The texture is then
rendered back to the framebuffer and the contents are checked for the
correct orientation using glReadPixels.
2012-08-09 16:31:50 +01:00
build build: Remove clutter-project.org from the release rules 2012-08-06 17:35:17 +01:00
cogl cogl-gles2-context: Wrap glCopyTex{Sub,}Image2D to flip the result 2012-08-09 16:31:50 +01:00
cogl-gles2 cogl-gles2: Add glTexParameterf to wrapper library 2012-06-20 12:51:34 +02:00
cogl-pango Mass rename CLUTTER_COMPILATION to COGL_COMPILATION 2012-06-20 19:52:03 +02:00
doc Remove the inclusion of cogl-rectangle.xml in the documentation 2012-06-20 17:35:19 +01:00
examples onscreen: Adds support for resizable windows 2012-07-09 22:35:40 +01:00
po Assamese translation updated 2012-08-08 13:29:50 +05:30
tests cogl-gles2-context: Wrap glCopyTex{Sub,}Image2D to flip the result 2012-08-09 16:31:50 +01:00
.gitignore Update .gitignore 2012-05-25 14:23:20 +01:00
.vimrc
COPYING Update the COPYING file 2011-09-05 19:02:05 +01:00
ChangeLog dist: Don't use elaborate script to gen Changelogs 2011-07-20 16:58:46 +01:00
Makefile.am Adds libcogl-gles2 frontend GLES2 api 2012-05-17 11:45:05 +01:00
NEWS Updates NEWS for the 1.10.0 release 2012-03-20 17:13:16 +00:00
README.in README: s/draw pretty pictures/render/ 2011-09-19 17:44:38 +01:00
autogen.sh build: avoid touching .po files during 'make' 2012-02-01 18:30:15 -05:00
cogl.doap
config-custom.h
config.h.win32.in VS 2008/2010 project files to build Cogl 2011-11-25 13:12:45 +00:00
configure.ac Add a wrapper for 'memmem' 2012-08-09 16:23:34 +01:00

README.in

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 API references for the latest stable release are available at:

   http://docs.clutter-project.org/docs/cogl/stable/

The experimental 2.0 API can be found here:

   http://docs.clutter-project.org/docs/cogl-2.0-experimental/stable/

   Note: The confusing "stable" at the end refers to the overall Cogl release
   status, not the documentation specifically.

--
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.