28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
From a849e5a1c77830b944a4e674c0ec20e151d23937 Mon Sep 17 00:00:00 2001
|
|
From: ptitSeb <sebastien.chev@gmail.com>
|
|
Date: Wed, 16 Mar 2022 15:51:19 +0100
|
|
Subject: [PATCH 195/233] Added GL_UNSIGNED_INT to target for pixel_convert,
|
|
and fixed GL_UNSIGNED_SHORT for target (for #366)
|
|
|
|
---
|
|
src/gl/pixel.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/gl/pixel.c b/src/gl/pixel.c
|
|
index def43085..f0f4fbe5 100644
|
|
--- a/src/gl/pixel.c
|
|
+++ b/src/gl/pixel.c
|
|
@@ -230,7 +230,8 @@ bool remap_pixel(const GLvoid *src, GLvoid *dst,
|
|
type_case(GL_HALF_FLOAT_OES, halffloat_t, write_each(,,float_f2h))
|
|
type_case(GL_BYTE, GLbyte, write_each(, * 127.0f,))
|
|
type_case(GL_UNSIGNED_BYTE, GLubyte, write_each(, * 255.0,))
|
|
- type_case(GL_UNSIGNED_SHORT, GLushort, write_each(, / 65535.0f,))
|
|
+ type_case(GL_UNSIGNED_SHORT, GLushort, write_each(, * 65535.0f,))
|
|
+ type_case(GL_UNSIGNED_INT, GLuint, write_each(, * (float)0xffffffff,))
|
|
type_case(GL_INT8_REV, GLubyte, write_each(, * 255.0,))
|
|
type_case(GL_INT8, GLubyte, write_each(max_a - , * 255.0,))
|
|
// TODO: force 565 to RGB? then we can change [4] -> 3
|
|
--
|
|
2.11.0
|
|
|