1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-12 08:04:09 +02:00

redefine GL_RGB565 to GL_RGBA on macOS (#361)

This makes depth based shadows work on macOS once again, as they
did before the redefinition was inadvertently removed in PR #355.

Fixes #360.
This commit is contained in:
Dmitri Shuralyov
2021-07-04 20:42:40 -04:00
committed by GitHub
parent dfe0dcb3f2
commit be4ef39281

View File

@@ -276,6 +276,12 @@
#include <OpenGL/gl3ext.h>
#include <OpenGL/glext.h>
// In OpenGL 2.1, the 16-bit RGB565 sized internal format is unavailable
// (because macOS doesn't provide the GL_ARB_ES2_compatibility extension),
// so use a 32-bit format for renderbuffer storage on macOS. See issue 360.
#undef GL_RGB565
#define GL_RGB565 GL_RGBA
// In compatibility mode, macOS only provides OpenGL 2.1 (no VAO), but it does
// support the Apple-specific VAO extension which is older and in all relevant
// parts 100% compatible. So use those functions instead.