Restore the bigendian support that was lost in
b0e26873f66a8f52,
by just not using GL_BGRA with GLES on bigendian. Should be a
very rare combination, but still.
memset (pixel_data, 255, sizeof pixel_data);
- if (!gdk_gl_context_has_bgra (gdk_gl_context_get_current ()))
+ if (!gdk_gl_context_has_bgra (gdk_gl_context_get_current ())
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+ || gdk_gl_context_get_use_es (gdk_gl_context_get_current ())
+#endif
+ )
{
gl_format = GL_RGBA;
gl_type = GL_UNSIGNED_BYTE;
gdk_gl_context_push_debug_group_printf (gdk_gl_context_get_current (),
"Uploading texture");
- if (!gdk_gl_context_has_bgra (gdk_gl_context_get_current ()))
+ if (!gdk_gl_context_has_bgra (gdk_gl_context_get_current ())
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+ || gdk_gl_context_get_use_es (gdk_gl_context_get_current ())
+#endif
+ )
{
pixel_data = free_data = g_malloc (width * height * 4);
gdk_memory_convert (pixel_data, width * 4,