mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-20 20:01:59 +02:00
Fix SDL2/GLES2 compilation (#352)
This commit is contained in:
committed by
GitHub
parent
cd7db1995e
commit
31122b2b76
@@ -78,6 +78,8 @@
|
|||||||
#define GL_TEXTURE_COMPARE_FUNC 0x884D
|
#define GL_TEXTURE_COMPARE_FUNC 0x884D
|
||||||
#define GL_COMPARE_REF_TO_TEXTURE 0x884E
|
#define GL_COMPARE_REF_TO_TEXTURE 0x884E
|
||||||
|
|
||||||
|
#define GL_NUM_EXTENSIONS 0x821D
|
||||||
|
|
||||||
#undef GL_RG
|
#undef GL_RG
|
||||||
#undef GL_RG32F
|
#undef GL_RG32F
|
||||||
#undef GL_RG16F
|
#undef GL_RG16F
|
||||||
@@ -92,6 +94,9 @@
|
|||||||
#define GL_RG16F GL_RGBA
|
#define GL_RG16F GL_RGBA
|
||||||
#define GL_HALF_FLOAT GL_HALF_FLOAT_OES
|
#define GL_HALF_FLOAT GL_HALF_FLOAT_OES
|
||||||
|
|
||||||
|
#define GL_R8 GL_R8_EXT
|
||||||
|
#define GL_RED GL_RED_EXT
|
||||||
|
|
||||||
#define GL_TEXTURE_WRAP_R 0
|
#define GL_TEXTURE_WRAP_R 0
|
||||||
#define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
|
#define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
|
||||||
#define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES
|
#define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES
|
||||||
@@ -1151,6 +1156,7 @@ namespace GAPI {
|
|||||||
|
|
||||||
|
|
||||||
bool extSupport(const char *str) {
|
bool extSupport(const char *str) {
|
||||||
|
#if !defined(_GAPI_GLES2)
|
||||||
if (glGetStringi != NULL) {
|
if (glGetStringi != NULL) {
|
||||||
GLint count = 0;
|
GLint count = 0;
|
||||||
glGetIntegerv(GL_NUM_EXTENSIONS, &count);
|
glGetIntegerv(GL_NUM_EXTENSIONS, &count);
|
||||||
@@ -1160,7 +1166,9 @@ namespace GAPI {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
const char *ext = (const char*)glGetString(GL_EXTENSIONS);
|
const char *ext = (const char*)glGetString(GL_EXTENSIONS);
|
||||||
if (!ext) {
|
if (!ext) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1172,6 +1180,7 @@ namespace GAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
|
|
||||||
#ifdef _OS_ANDROID
|
#ifdef _OS_ANDROID
|
||||||
//void *libGL = dlopen("libGLESv2.so", RTLD_LAZY);
|
//void *libGL = dlopen("libGLESv2.so", RTLD_LAZY);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user