mutter/cogl
Neil Roberts 5288f6d88d Add a Cogl texture 3D backend
This adds a publicly exposed experimental API for a 3D texture
backend. There is a feature flag which can be checked for whether 3D
textures are supported. Although we require OpenGL 1.2 which has 3D
textures in core, GLES only provides them through an extension so the
feature can be used to detect that.

The textures can be created with one of two new API functions :-

cogl_texture_3d_new_with_size

 and

cogl_texture_3d_new_from_data

There is also internally a new_from_bitmap function. new_from_data is
implemented in terms of this function.

The two constructors are effectively the only way to upload data to a
3D texture. It does not work to call glTexImage2D with the
GL_TEXTURE_3D target so the virtual for cogl_texture_set_region does
nothing. It would be possible to make cogl_texture_get_data do
something sensible like returning all of the images as a single long
image but this is not currently implemented and instead the virtual
just always fails. We may want to add API specific to the 3D texture
backend to get and set a sub region of the texture.

All of those three functions can throw a GError. This will happen if
the GPU does not support 3D textures or it does not support NPOTs and
an NPOT size is requested. It will also fail if the FBO extension is
not supported and the COGL_TEXTURE_NO_AUTO_MIPMAP flag is not
given. This could be avoided by copying the code for the
GL_GENERATE_MIPMAP TexParameter fallback, but in the interests of
keeping the code simple this is not yet done.

This adds a couple of functions to cogl-texture-driver for uploading
3D data and querying the 3D proxy
texture. prep_gl_for_pixels_upload_full now also takes sets the
GL_UNPACK_IMAGE_HEIGHT parameter so that 3D textures can have padding
between the images. Whenever 3D texture is uploading, both the height
of the images and the height of all of the data is specified (either
explicitly or implicilty from the CoglBitmap) so that the image height
can be deduced by dividing by the depth.
2010-07-13 14:28:52 +01:00
..
driver Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
tesselator Fix building the tesselator code for GLES 2010-07-01 20:39:57 +01:00
winsys cogl-texture-pixmap-x11: This API is new in 1.4, not 1.2 2010-07-09 17:55:31 +01:00
cogl-atlas-texture-private.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-atlas-texture.c Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-atlas.c Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-atlas.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-bitmap-fallback.c cogl-bitmap: Fix converting formats with and without alpha channels 2010-04-21 10:56:21 +01:00
cogl-bitmap-pixbuf.c Make a public CoglBitmapError enum 2010-07-13 14:28:45 +01:00
cogl-bitmap-private.h bitmap: Remove use of CoglHandle in the CoglBitmap API 2010-06-01 12:20:59 +01:00
cogl-bitmap.c Make a public CoglBitmapError enum 2010-07-13 14:28:45 +01:00
cogl-bitmap.h Make a public CoglBitmapError enum 2010-07-13 14:28:45 +01:00
cogl-bitmask.c cogl: Add an internal CoglBitmask type 2010-05-24 16:10:56 +01:00
cogl-bitmask.h cogl: Add an internal CoglBitmask type 2010-05-24 16:10:56 +01:00
cogl-blend-string.c blend-strings: removes the AUTO_COMPOSITE function enum 2010-06-15 15:26:27 +01:00
cogl-blend-string.h blend-strings: removes the AUTO_COMPOSITE function enum 2010-06-15 15:26:27 +01:00
cogl-buffer-private.h cogl-buffer: Move malloc fallback logic into CoglBuffer 2010-07-07 14:08:11 +01:00
cogl-buffer.c cogl-buffer: Move malloc fallback logic into CoglBuffer 2010-07-07 14:08:11 +01:00
cogl-buffer.h cogl-buffer: consider it an error to free a mapped buffer 2010-07-07 14:08:11 +01:00
cogl-clip-stack.c Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-clip-stack.h clip_stack: Remove use of CoglHandle in the CoglClipStack API 2010-06-01 12:20:59 +01:00
cogl-clip-state.c framebuffer: Replace CoglHandle with CoglFramebuffer * 2010-07-07 14:41:54 +01:00
cogl-clip-state.h cogl: Implement retained clip stacks 2010-04-15 14:51:01 +01:00
cogl-color-private.h cogl-color: add private _cogl_color_get_rgba_4ubv API 2010-06-15 15:26:27 +01:00
cogl-color.c cogl-color: add cogl_color_init_from_xyz funcs 2010-06-15 15:26:27 +01:00
cogl-color.h cogl-color: add cogl_color_init_from_xyz funcs 2010-06-15 15:26:27 +01:00
cogl-context.c cogl-material: Add support for point sprites 2010-07-08 16:34:30 +01:00
cogl-context.h cogl-material: Add a property for setting the point size 2010-07-08 16:34:30 +01:00
cogl-debug.c debug: Adds a COGL_DEBUG=disable-pbos debug option 2010-07-06 12:09:01 +01:00
cogl-debug.h debug: Adds a COGL_DEBUG=disable-pbos debug option 2010-07-06 12:09:01 +01:00
cogl-defines.h.in configure: Include gl2ext.h or glext.h under GLES 2010-07-13 14:28:51 +01:00
cogl-deprecated.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00: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: Add the infrastructure for checking for winsys extensions 2010-06-22 12:22:43 +01:00
cogl-feature-private.h cogl: Add the infrastructure for checking for winsys extensions 2010-06-22 12:22:43 +01:00
cogl-fixed.c Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-fixed.h analysis: Fix some CoglFixed API 2010-06-01 12:08:18 +01:00
cogl-framebuffer-private.h framebuffer: Replace CoglHandle with CoglFramebuffer * 2010-07-07 14:41:54 +01:00
cogl-framebuffer.c Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-handle.h CoglObject: Adds cogl_object_{get,set}_user_data 2010-06-04 14:44:15 +01:00
cogl-internal.h Pass all Xlib events through Cogl 2010-06-22 12:20:59 +01:00
cogl-journal-private.h cogl: remove _cogl_material_flush_gl_state flush options 2010-06-15 15:26:27 +01:00
cogl-journal.c framebuffer: Replace CoglHandle with CoglFramebuffer * 2010-07-07 14:41:54 +01:00
cogl-material-arbfp-private.h material: Split the fragment processing backends out 2010-06-30 15:04:10 +01:00
cogl-material-arbfp.c Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
cogl-material-fixed-private.h material: Split the fragment processing backends out 2010-06-30 15:04:10 +01:00
cogl-material-fixed.c material: route fogging state through CoglMaterial 2010-07-07 14:12:15 +01:00
cogl-material-glsl-private.h material: Split the fragment processing backends out 2010-06-30 15:04:10 +01:00
cogl-material-glsl.c build: Fix GLES builds since the material backend split 2010-07-05 14:50:47 +01:00
cogl-material-private.h material: use common node type for materials and layers 2010-07-09 18:04:27 +01:00
cogl-material.c Rename COGL_ERROR_MISSING_FEATURE to COGL_ERROR_UNSUPPORTED 2010-07-13 14:28:36 +01:00
cogl-material.h cogl: Add Stability tag to new experimental API 2010-07-09 17:17:11 +01:00
cogl-matrix-mesa.c Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-matrix-mesa.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-matrix-private.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-matrix-stack.c Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-matrix-stack.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-matrix.c matrix: add cogl_matrix_equal API 2010-06-09 15:19:31 +01:00
cogl-matrix.h matrix: add cogl_matrix_equal API 2010-06-09 15:19:31 +01:00
cogl-object-private.h Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-object.c CoglObject: Adds cogl_object_{get,set}_user_data 2010-06-04 14:44:15 +01:00
cogl-object.h CoglObject: Adds a COGL_OBJECT macro for casting 2010-06-04 14:44:15 +01:00
cogl-offscreen.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-path-private.h cogl-path: Allow changing the fill rule 2010-06-29 20:37:14 +01:00
cogl-path.c Fix building the tesselator code for GLES 2010-07-01 20:39:57 +01:00
cogl-path.h cogl-path: Allow changing the fill rule 2010-06-29 20:37:14 +01:00
cogl-pixel-array-private.h cogl-buffer: Track the last used bind target in CoglBuffer 2010-07-07 14:08:11 +01:00
cogl-pixel-array.c cogl-buffer: Move malloc fallback logic into CoglBuffer 2010-07-07 14:08:11 +01:00
cogl-pixel-array.h pixel-array: Only allow allocation of arrays with a 2D size 2010-07-05 15:20:04 +01:00
cogl-primitives.c cogl-texture: Replace the ensure_mipmaps virtual with pre_paint 2010-06-22 11:47:33 +01:00
cogl-primitives.h Use begin/end macros in cogl-primitives.h 2010-03-25 09:33:26 +00:00
cogl-profile.c profiling: Adds initial UProf accounting to Cogl 2010-01-08 20:19:50 +00:00
cogl-profile.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-shader.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-spans.c Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-spans.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-sub-texture-private.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-sub-texture.c Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-texture-2d-private.h Add _cogl_texture_2d_externally_modified 2010-06-22 11:47:32 +01:00
cogl-texture-2d-sliced-private.h Split the wrap mode of _cogl_texture_set_wrap_mode into three 2010-04-12 15:44:23 +01:00
cogl-texture-2d-sliced.c Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-texture-2d.c Move _cogl_texture_2d_is_pot to cogl-util.h 2010-07-13 14:28:35 +01:00
cogl-texture-3d-private.h Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
cogl-texture-3d.c Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
cogl-texture-3d.h Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
cogl-texture-driver.h Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
cogl-texture-private.h Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-texture-rectangle-private.h cogl: Add an internal CoglTextureRectangle backend 2010-06-22 11:47:33 +01:00
cogl-texture-rectangle.c Don't define public cogl_is_* functions for internal types 2010-07-09 18:57:54 +01:00
cogl-texture.c Fix cogl_texture_get_data when an intermediate buffer is used 2010-07-09 11:14:15 +01:00
cogl-texture.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-types.h Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
cogl-util.c CoglObject: Adds cogl_object_{get,set}_user_data 2010-06-04 14:44:15 +01:00
cogl-util.h Move _cogl_texture_2d_is_pot to cogl-util.h 2010-07-13 14:28:35 +01:00
cogl-vector.c math: Adds an experimental cogl_vector3_* API 2010-05-20 17:18:24 +01:00
cogl-vector.h cogl: declare experimental symbols consistently 2010-06-30 18:51:31 +01:00
cogl-vertex-buffer-private.h Remove mentions of the FSF address 2010-03-01 12:56:10 +00:00
cogl-vertex-buffer.c cogl: Don't define the deprecated ref/unref accessors for new types 2010-07-09 18:57:54 +01:00
cogl-vertex-buffer.h Add cogl_vertex_buffer_is_indices to the public headers 2010-07-09 18:57:54 +01:00
cogl.c framebuffer: Replace CoglHandle with CoglFramebuffer * 2010-07-07 14:41:54 +01:00
cogl.h Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01: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 Add a Cogl texture 3D backend 2010-07-13 14:28:52 +01:00
stb_image.c Update stb_image.c 2010-03-03 17:02:51 +00:00