summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorbinbitten <martinsjursen@gmail.com>2017-12-25 21:01:01 +0100
committerbinbitten <martinsjursen@gmail.com>2017-12-25 21:01:01 +0100
commit267bad6b4c3485e12939a0e914d45319b66f67df (patch)
treef4e910bc0a1a9dd5fefa777e4bf6b1ce2f43d8fa /drivers
parent37aab45091961e7c063e9c77d6c4835b0c14806a (diff)
Add missing image format RGB10A2. Fixes #14964
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 8ee9e3fdb8..c65ab0bd14 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -193,6 +193,13 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
r_gl_type = GL_UNSIGNED_SHORT_5_5_5_1;
} break;
+ case Image::FORMAT_RGB10A2: {
+
+ r_gl_internal_format = GL_RGB10_A2;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_INT_2_10_10_10_REV;
+
+ } break;
case Image::FORMAT_RF: {
r_gl_internal_format = GL_R32F;
@@ -6082,7 +6089,7 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
color_internal_format = GL_RGB10_A2;
color_format = GL_RGBA;
color_type = GL_UNSIGNED_INT_2_10_10_10_REV;
- image_format = Image::FORMAT_RGBA8;
+ image_format = Image::FORMAT_RGB10A2;
} else {
color_internal_format = GL_RGBA8;