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:
@@ -276,6 +276,12 @@
|
|||||||
#include <OpenGL/gl3ext.h>
|
#include <OpenGL/gl3ext.h>
|
||||||
#include <OpenGL/glext.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
|
// 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
|
// support the Apple-specific VAO extension which is older and in all relevant
|
||||||
// parts 100% compatible. So use those functions instead.
|
// parts 100% compatible. So use those functions instead.
|
||||||
|
Reference in New Issue
Block a user