mutter/cogl
Neil Roberts ae7825275e cogl: Make CoglSubTexture only work for quad rendering
The sub texture backend doesn't work well as a completely general
texture backend because for example when rendering with cogl_polygon
it needs to be able to tranform arbitrary texture coordinates without
reference to the other coordintes. This can't be done when the texture
coordinates are a multiple of one because sometimes the coordinate
should represent the left or top edge and sometimes it should
represent the bottom or top edge. For example if the s coordinates are
0 and 1 then 1 represents the right edge but if they are 1 and 2 then
1 represents the left edge.

Instead the sub-textures are now documented not to support coordinates
outside the range [0,1]. The coordinates for the sub-region are now
represented as integers as this helps avoid rounding issues. The
region can no longer be a super-region of the texture as this
simplifies the code quite a lot.

There are two new texture virtual functions:

transform_quad_coords_to_gl - This transforms two pairs of coordinates
     representing a quad. It will return FALSE if the coordinates can
     not be transformed. The sub texture backend uses this to detect
     coordinates that require repeating which causes cogl-primitives
     to use manual repeating.

ensure_non_quad_rendering - This is used in cogl_polygon and
     cogl_vertex_buffer to inform the texture backend that
     transform_quad_to_gl is going to be used. The atlas backend
     migrates the texture out of the atlas when it hits this.
2010-01-18 09:22:04 +00:00
..
driver Merge branch 'master' into more-texture-backends 2010-01-15 12:15:46 +00:00
winsys build: Make COGL pass distcheck 2009-10-23 13:38:40 +01:00
cogl-atlas-texture-private.h cogl: Add an atlased texture backend 2009-12-04 20:26:39 +00:00
cogl-atlas-texture.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-atlas.c cogl-atlas: Add a debug option to visualize the atlas 2009-12-04 20:29:12 +00:00
cogl-atlas.h cogl: Add an atlased texture backend 2009-12-04 20:26:39 +00:00
cogl-bitmap-fallback.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-bitmap-pixbuf.c osx: CGBitmapContextCreate can't make 24bpp, alphaless offscreen pixmaps 2009-11-06 14:10:41 +00:00
cogl-bitmap-private.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-bitmap.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-bitmap.h docs: Documentation fixes for CoglBitmap 2009-11-19 13:56:47 +00:00
cogl-blend-string.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-blend-string.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-clip-stack.c cogl: deprecate cogl_draw_buffer API and replace with a cogl_framebuffer API 2009-11-26 19:33:14 +00:00
cogl-clip-stack.h [draw-buffers] First pass at overhauling Cogl's framebuffer management 2009-11-03 17:23:03 +00:00
cogl-color.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-color.h Whitespace fix for cogl-color.h 2009-11-19 13:56:47 +00:00
cogl-context.c cogl: Add an atlased texture backend 2009-12-04 20:26:39 +00:00
cogl-context.h cogl: Add an atlased texture backend 2009-12-04 20:26:39 +00:00
cogl-debug.c cogl-atlas: Add a debug option to visualize the atlas 2009-12-04 20:29:12 +00:00
cogl-debug.h cogl-atlas: Add a debug option to visualize the atlas 2009-12-04 20:29:12 +00:00
cogl-deprecated.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-enum-types.c.in Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-enum-types.h.in Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-feature-private.c cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
cogl-feature-private.h cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
cogl-fixed.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-fixed.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-framebuffer-private.h cogl: Support multiple fallbacks in cogl_offscreen_new_to_texture() 2010-01-11 15:32:52 +00:00
cogl-framebuffer.c cogl-framebuffer: Return gboolean from try_creating_fbo 2010-01-14 14:10:05 +00:00
cogl-handle.h [cogl-texture] Split CoglTexture into an abstract class + CoglTexture2dSliced 2009-10-16 18:58:51 +01:00
cogl-internal.h build: Move CoglMatrixMode to cogl-matrix-stack.h 2010-01-04 11:58:32 +00:00
cogl-journal-private.h cogl: Make the callback for foreach_sub_texture_in_region use const 2009-12-02 22:03:08 +00:00
cogl-journal.c Merge branch 'master' into more-texture-backends 2010-01-15 12:15:46 +00:00
cogl-material-private.h [cogl-material] Adds cogl_material_copy() API 2009-11-24 17:58:22 +00:00
cogl-material.c Merge branch 'master' into more-texture-backends 2010-01-15 12:15:46 +00:00
cogl-material.h [cogl-material] Adds cogl_material_copy() API 2009-11-24 17:58:22 +00:00
cogl-matrix-mesa.c Remove a gtk-doc annotation 2009-12-02 11:37:13 +00:00
cogl-matrix-mesa.h docs: Remove non-gtk-doc annotations 2009-11-19 13:55:46 +00:00
cogl-matrix-private.h [debug] Adds a COGL_DEBUG=matrices debug option 2009-11-04 03:34:04 +00:00
cogl-matrix-stack.c cogl: deprecate cogl_draw_buffer API and replace with a cogl_framebuffer API 2009-11-26 19:33:14 +00:00
cogl-matrix-stack.h build: Move CoglMatrixMode to cogl-matrix-stack.h 2010-01-04 11:58:32 +00:00
cogl-matrix.c [matrix] Adds cogl_matrix_get_inverse API 2009-11-04 03:34:05 +00:00
cogl-matrix.h docs: Documentation fixes for CoglMatrix 2009-11-19 13:56:47 +00:00
cogl-offscreen.h cogl_offscreen: deprecate cogl_offscreen_ref/unref. 2009-11-26 19:33:13 +00:00
cogl-path.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-primitives.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-primitives.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-profile.c profiling: Adds initial UProf accounting to Cogl 2010-01-08 20:19:50 +00:00
cogl-profile.h profiling: Adds initial UProf accounting to Cogl 2010-01-08 20:19:50 +00:00
cogl-shader.h cogl: Remove the CGL_* defines 2010-01-12 17:10:15 +00:00
cogl-spans.c [cogl-spans] split out cogl-spans code from cogl-texture-2d-sliced 2009-10-16 18:58:52 +01:00
cogl-spans.h [cogl-spans] split out cogl-spans code from cogl-texture-2d-sliced 2009-10-16 18:58:52 +01:00
cogl-sub-texture-private.h cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-sub-texture.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-texture-2d-private.h cogl: Add a CoglTexture2D backend 2009-12-02 22:03:27 +00:00
cogl-texture-2d-sliced-private.h cogl: Move some of the texture_2d_sliced_new_* functions into cogl-texture 2009-12-02 22:03:26 +00:00
cogl-texture-2d-sliced.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-texture-2d.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-texture-driver.h cogl: Add _cogl_texture_driver_upload_to_gl 2009-12-02 22:03:26 +00:00
cogl-texture-private.h cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-texture.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-texture.h cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-types.h cogl: Add an atlased texture backend 2009-12-04 20:26:39 +00:00
cogl-util.c [cogl] Removes the cogl-current-matrix abstraction 2009-10-20 12:32:50 +01:00
cogl-util.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-vertex-buffer-private.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-vertex-buffer.c cogl: Make CoglSubTexture only work for quad rendering 2010-01-18 09:22:04 +00:00
cogl-vertex-buffer.h docs: Increase consistency in Cogl documentation 2009-11-19 14:19:59 +00:00
cogl.c cogl: deprecate cogl_draw_buffer API and replace with a cogl_framebuffer API 2009-11-26 19:33:14 +00:00
cogl.h cogl: deprecate cogl_draw_buffer API and replace with a cogl_framebuffer API 2009-11-26 19:33:14 +00:00
cogl.pc.in Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
Makefile.am Merge branch 'master' into more-texture-backends 2010-01-15 12:15:46 +00:00
stb_image.c Covert stb_image.c to Unix format 2010-01-05 18:02:29 +00:00