mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
c40d5ae9ea
cogl-primitives.c was previously digging right into CoglTextures so it could manually iterate the texture slices for texturing quads and polygons and because we were missing some state getters we were lazily just poking into the structures directly. This adds some extra state getter functions, and adds a higher level _cogl_texture_foreach_slice () API that hopefully simplifies the way in which sliced textures may be used to render primitives. This lets you specify a rectangle in "virtual" texture coords and it will call a given callback for each slice that intersects that rectangle giving the virtual coords of the current slice and corresponding "real" texture coordinates for the underlying gl texture. At the same time a noteable bug in how we previously iterated sliced textures was fixed, whereby we weren't correctly handling inverted texture coordinates. E.g. with the previous code if you supplied texture coords of tx1=100,ty1=0,tx2=0,ty2=100 (inverted along y axis) that would result in a back-facing quad, which could be discarded if using back-face culling. |
||
---|---|---|
.. | ||
cogl-context-driver.c | ||
cogl-context-driver.h | ||
cogl-defines.h.in | ||
cogl-fbo.c | ||
cogl-fbo.h | ||
cogl-primitives.c | ||
cogl-program.c | ||
cogl-program.h | ||
cogl-shader-private.h | ||
cogl-shader.c | ||
cogl-texture-driver.c | ||
cogl.c | ||
Makefile.am |