1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

GL: fix and clean up some code

This commit is contained in:
sfan5 2024-11-28 10:39:07 +01:00
parent 36edc3f161
commit 1fb7202028
17 changed files with 54 additions and 177 deletions

View file

@ -170,6 +170,17 @@ public:
return;
}
#ifndef IRR_COMPILE_GL_COMMON
// On GLES 3.0 we must use sized internal formats for textures in certain
// cases (e.g. with ETT_2D_MS). However ECF_A8R8G8B8 is mapped to GL_BGRA
// (an unsized format).
// Since we don't upload to RTT we can safely pick a different combo that works.
if (InternalFormat == GL_BGRA && Driver->Version.Major >= 3) {
InternalFormat = GL_RGBA8;
PixelFormat = GL_RGBA;
}
#endif
#ifdef _DEBUG
char lbuf[100];
snprintf_irr(lbuf, sizeof(lbuf),