Skip to content

Add float texture formats

Benjamin Otte requested to merge wip/otte/float-textures into master

This implement step1 of what I outlined in #4232 - adding more GdkMemoryFormats and a gdk_texture_download_float() function to get at the data.

Summary of what got done:

  1. An internal gdk_texture_download_texture() was added that downloads a memory texture in any format. GL implements that by downloading the texture in the format GL keeps it in.

  2. That method was used to implement (a) fallbacks for GLES and (b) gdk_gl_texture_release().

  3. gdk_gl_texture_download() now uses glGetTexImage() instead of glReadPixels()viagdk_cairo_draw_from_gl()`.

  4. No Cairo is used by GdkGLTexture anymore now. Cairo GL functions are now deprecated.

  5. gdk_texture_download_float() was added to download HDR textures.

  6. 6 new entries to GdkMemoryFormat were added: 16bit unsigned, 16bit half-float and 32bit float for RGB and premultiplied RGBA.

Edited by Benjamin Otte

Merge request reports