mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
b4bc9eb458
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. |
||
---|---|---|
.. | ||
cogl-bitmap-fallback.c | ||
cogl-bitmap-pixbuf.c | ||
cogl-bitmap-private.h | ||
cogl-bitmap.c | ||
cogl-blend-string.c | ||
cogl-blend-string.h | ||
cogl-clip-stack.c | ||
cogl-clip-stack.h | ||
cogl-color.c | ||
cogl-current-matrix.c | ||
cogl-current-matrix.h | ||
cogl-debug.c | ||
cogl-enum-types.c.in | ||
cogl-enum-types.h.in | ||
cogl-fixed.c | ||
cogl-handle.h | ||
cogl-internal.h | ||
cogl-material-private.h | ||
cogl-material.c | ||
cogl-matrix-stack.c | ||
cogl-matrix-stack.h | ||
cogl-matrix.c | ||
cogl-primitives.c | ||
cogl-primitives.h | ||
cogl-util.c | ||
cogl-util.h | ||
cogl-vertex-buffer-private.h | ||
cogl-vertex-buffer.c | ||
cogl.c | ||
Makefile.am | ||
stb_image.c |