1
0
Fork 0
mutter-performance-source/clutter/cogl/common
Robert Bragg 33400c0aae [cogl] Improve ability to break out into raw OpenGL via begin/end mechanism
Although we wouldn't recommend developers try and interleve OpenGL drawing
with Cogl drawing - we would prefer patches that improve Cogl to avoid this
if possible - we are providing a simple mechanism that will at least give
developers a fighting chance if they find it necissary.

Note: we aren't helping developers change OpenGL state to modify the
behaviour of Cogl drawing functions - it's unlikley that can ever be
reliably supported - but if they are trying to do something like:

   - setup some OpenGL state.
   - draw using OpenGL (e.g. glDrawArrays() )
   - reset modified OpenGL state.
   - continue using Cogl to draw

They should surround their blocks of raw OpenGL with cogl_begin_gl() and
cogl_end_gl():

   cogl_begin_gl ();
   - setup some OpenGL state.
   - draw using OpenGL (e.g. glDrawArrays() )
   - reset modified OpenGL state.
   cogl_end_gl ();
   - continue using Cogl to draw

Again; we aren't supporting code like this:
   - setup some OpenGL state.
   - use Cogl to draw
   - reset modified OpenGL state.
When the internals of Cogl evolves, this is very liable to break.

cogl_begin_gl() will flush all internally batched Cogl primitives, and emit
all internal Cogl state to OpenGL as if it were going to draw something
itself.

The result is that the OpenGL modelview matrix will be setup; the state
corresponding to the current source material will be setup and other world
state such as backface culling, depth and fogging enabledness will be also
be sent to OpenGL.

Note: no special material state is flushed, so if developers want Cogl to setup
a simplified material state it is the their responsibility to set a simple
source material before calling cogl_begin_gl. E.g. by calling
cogl_set_source_color4ub().

Note: It is the developers responsibility to restore any OpenGL state that they
modify to how it was after calling cogl_begin_gl() if they don't do this then
the result of further Cogl calls is undefined.
2009-06-30 17:13:38 +01:00
..
cogl-bitmap-fallback.c [bitmap] Fixes _cogl_bitmap_fallback_unpremult 2009-06-11 14:17:52 +01:00
cogl-bitmap-pixbuf.c Implement premultiplication for CoglBitmap 2009-06-11 14:17:51 +01:00
cogl-bitmap-private.h Implement premultiplication for CoglBitmap 2009-06-11 14:17:51 +01:00
cogl-bitmap.c Implement premultiplication for CoglBitmap 2009-06-11 14:17:51 +01:00
cogl-blend-string.c [build] Fix compiler warnings 2009-06-05 16:46:12 +01:00
cogl-blend-string.h [cogl-material] Support string based blending and layer combine descriptions 2009-05-28 02:43:28 +01:00
cogl-clip-stack.c [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
cogl-clip-stack.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-color.c [cogl-color] Adds a cogl_color_equal() function 2009-06-30 17:13:35 +01:00
cogl-current-matrix.c [cogl] Force Cogl to always use the client side matrix stack 2009-06-30 17:13:35 +01:00
cogl-current-matrix.h [cogl matrix] Adds ability to dirty state cached by the client matrix apis 2009-06-29 23:49:06 +01:00
cogl-debug.c [cogl journal] Perform software modelview transform on logged quads. 2009-06-30 17:13:36 +01:00
cogl-enum-types.c.in Use g_once when registering enumeration types 2009-05-29 12:40:23 +01:00
cogl-enum-types.h.in [cogl] Generate enumeration GTypes 2009-05-29 12:31:47 +01:00
cogl-fixed.c [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-handle.h [material] Reduce the material API in preperation for releasing Clutter 1.0 2009-05-28 02:43:34 +01:00
cogl-internal.h [build] The cogl GE macro wasn't passing an int according to the format string 2009-05-21 15:10:38 +01:00
cogl-material-private.h [cogl material] optimize logging of material colors in the journal 2009-06-30 17:13:35 +01:00
cogl-material.c [cogl-material] Be more carefull about flushing in cogl_material_remove_layer 2009-06-30 17:13:38 +01:00
cogl-matrix-stack.c [cogl matrix] Adds ability to dirty state cached by the client matrix apis 2009-06-29 23:49:06 +01:00
cogl-matrix-stack.h [cogl matrix] Adds ability to dirty state cached by the client matrix apis 2009-06-29 23:49:06 +01:00
cogl-matrix.c [cogl matrix] Support ortho and perspective projections. 2009-05-28 02:43:35 +01:00
cogl-primitives.c [journal] Don't resize a singlton VBO; create and destroy a VBO each flush 2009-06-30 17:13:37 +01:00
cogl-primitives.h [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
cogl-util.c [cogl] Generate enumeration GTypes 2009-05-29 12:31:47 +01:00
cogl-util.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-vertex-buffer-private.h Use GL_QUADS for flushing a quad batch 2009-06-01 17:29:01 +01:00
cogl-vertex-buffer.c [cogl-vertex-buffer] Disable unused client tex coord arrays 2009-06-30 17:13:37 +01:00
cogl.c [cogl] Improve ability to break out into raw OpenGL via begin/end mechanism 2009-06-30 17:13:38 +01:00
Makefile.am Disable single header inclusion for GLib 2009-06-15 11:29:37 +01:00
stb_image.c Merged clutter-ivan branch into trunk. 2008-04-25 13:37:36 +00:00