summaryrefslogtreecommitdiff
path: root/src/helpers/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Format.cpp')
-rw-r--r--src/helpers/Format.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/helpers/Format.cpp b/src/helpers/Format.cpp
index 9c94f68b..65828519 100644
--- a/src/helpers/Format.cpp
+++ b/src/helpers/Format.cpp
@@ -11,9 +11,13 @@
*/
inline const std::vector<SPixelFormat> GLES3_FORMATS = {
{
- .drmFormat = DRM_FORMAT_ARGB8888,
- .flipRB = true,
- .glFormat = GL_RGBA,
+ .drmFormat = DRM_FORMAT_ARGB8888,
+ .flipRB = true,
+#ifndef GLES2
+ .glFormat = GL_RGBA,
+#else
+ .glFormat = GL_BGRA_EXT,
+#endif
.glType = GL_UNSIGNED_BYTE,
.withAlpha = true,
.alphaStripped = DRM_FORMAT_XRGB8888,
@@ -22,7 +26,11 @@ inline const std::vector<SPixelFormat> GLES3_FORMATS = {
{
.drmFormat = DRM_FORMAT_XRGB8888,
.flipRB = true,
- .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glFormat = GL_RGBA,
+#else
+ .glFormat = GL_BGRA_EXT,
+#endif
.glType = GL_UNSIGNED_BYTE,
.withAlpha = false,
.alphaStripped = DRM_FORMAT_XRGB8888,