mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-05 04:37:50 +02:00
fix android and GL ES3 shaders
This commit is contained in:
@@ -1317,11 +1317,15 @@ namespace GAPI {
|
|||||||
char extHeader[256];
|
char extHeader[256];
|
||||||
GLSL_HEADER_VERT[0] = GLSL_HEADER_FRAG[0] = extHeader[0] = 0;
|
GLSL_HEADER_VERT[0] = GLSL_HEADER_FRAG[0] = extHeader[0] = 0;
|
||||||
if (_GL_OES_standard_derivatives) {
|
if (_GL_OES_standard_derivatives) {
|
||||||
|
if (!GLES3) {
|
||||||
strcat(extHeader, "#extension GL_OES_standard_derivatives : enable\n");
|
strcat(extHeader, "#extension GL_OES_standard_derivatives : enable\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_GL_EXT_shadow_samplers && !_GL_ARB_shadow) {
|
if (_GL_EXT_shadow_samplers && !_GL_ARB_shadow) {
|
||||||
|
if (!GLES3) {
|
||||||
strcat(extHeader, "#extension GL_EXT_shadow_samplers : enable\n");
|
strcat(extHeader, "#extension GL_EXT_shadow_samplers : enable\n");
|
||||||
|
}
|
||||||
strcat(extHeader, "#define USE_GL_EXT_shadow_samplers\n");
|
strcat(extHeader, "#define USE_GL_EXT_shadow_samplers\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1346,6 +1350,7 @@ namespace GAPI {
|
|||||||
"#define texture2D texture\n"
|
"#define texture2D texture\n"
|
||||||
"#define texture3D texture\n"
|
"#define texture3D texture\n"
|
||||||
"#define textureCube texture\n"
|
"#define textureCube texture\n"
|
||||||
|
"#define shadow2DEXT texture\n"
|
||||||
"out vec4 fragColor;\n");
|
"out vec4 fragColor;\n");
|
||||||
} else {
|
} else {
|
||||||
// vertex
|
// vertex
|
||||||
|
@@ -189,7 +189,7 @@ JNI_METHOD(void, nativeFrameRender)(JNIEnv* env) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JNI_METHOD(void, nativeResize)(JNIEnv* env, jobject obj, jint x, jint y, jint w, jint h) {
|
JNI_METHOD(void, nativeResize)(JNIEnv* env, jobject obj, jint x, jint y, jint w, jint h) {
|
||||||
Core::viewportDef = Viewport(x, y, w, h);
|
Core::viewportDef = short4(x, y, w, h);
|
||||||
Core::x = x;
|
Core::x = x;
|
||||||
Core::y = y;
|
Core::y = y;
|
||||||
Core::width = w;
|
Core::width = w;
|
||||||
|
Reference in New Issue
Block a user