Make the callers of this function check for
straight alpha themselves, and only do the
version compatibility check here. This makes
the function usable in contexts where straight
alpha is acceptable.
GLenum q_internal_format, q_format, q_type;
GLint q_swizzle[4];
+ if (gdk_memory_format_alpha (format) == GDK_MEMORY_ALPHA_STRAIGHT)
+ continue;
+
if (!gdk_memory_format_gl_format (format, use_es, gl_major, gl_minor, &q_internal_format, &q_format, &q_type, &q_swizzle))
continue;
*out_type = memory_formats[format].gl.type;
memcpy (out_swizzle, &memory_formats[format].gl.swizzle, sizeof(GLint) * 4);
- if (memory_formats[format].alpha == GDK_MEMORY_ALPHA_STRAIGHT)
- return FALSE;
-
if (gles)
{
if (memory_formats[format].min_gl_version.gles_major > gl_major ||
gl_internalformat,
gl_format,
gl_type,
- gl_swizzle))
+ gl_swizzle) &&
+ gdk_memory_format_alpha (data_format) != GDK_MEMORY_ALPHA_STRAIGHT)
return data_format;
if (gdk_memory_format_prefers_high_depth (data_format))