mcst-linux-kernel/patches-2024.06.26/gl4es-1.1.4/0102-Use-GL_FLOAT-if-suppor...

27 lines
838 B
Diff

From 55903c213f48de9f6c06537688ced15cce43ee7f Mon Sep 17 00:00:00 2001
From: ptitSeb <sebastien.chev@gmail.com>
Date: Wed, 2 Dec 2020 12:55:52 +0100
Subject: [PATCH 102/233] Use GL_FLOAT if support for Depth Textures (help
#252)
---
src/gl/texture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gl/texture.c b/src/gl/texture.c
index 12a345ec..983a70eb 100644
--- a/src/gl/texture.c
+++ b/src/gl/texture.c
@@ -159,7 +159,7 @@ void internal2format_type(GLenum internalformat, GLenum *format, GLenum *type)
break;
case GL_DEPTH_COMPONENT:
*format = GL_DEPTH_COMPONENT;
- *type = GL_UNSIGNED_SHORT;
+ *type = (hardext.floattex)?GL_FLOAT:GL_UNSIGNED_SHORT;
break;
case GL_DEPTH_STENCIL:
case GL_DEPTH24_STENCIL8:
--
2.11.0