mirror of
https://github.com/XProger/OpenLara.git
synced 2025-04-21 19:41:53 +02:00
fix android and GL ES3 shaders
This commit is contained in:
parent
576a7cda0d
commit
e05c587681
@ -1317,11 +1317,15 @@ namespace GAPI {
|
||||
char extHeader[256];
|
||||
GLSL_HEADER_VERT[0] = GLSL_HEADER_FRAG[0] = extHeader[0] = 0;
|
||||
if (_GL_OES_standard_derivatives) {
|
||||
strcat(extHeader, "#extension GL_OES_standard_derivatives : enable\n");
|
||||
if (!GLES3) {
|
||||
strcat(extHeader, "#extension GL_OES_standard_derivatives : enable\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (_GL_EXT_shadow_samplers && !_GL_ARB_shadow) {
|
||||
strcat(extHeader, "#extension GL_EXT_shadow_samplers : enable\n");
|
||||
if (!GLES3) {
|
||||
strcat(extHeader, "#extension GL_EXT_shadow_samplers : enable\n");
|
||||
}
|
||||
strcat(extHeader, "#define USE_GL_EXT_shadow_samplers\n");
|
||||
}
|
||||
|
||||
@ -1346,6 +1350,7 @@ namespace GAPI {
|
||||
"#define texture2D texture\n"
|
||||
"#define texture3D texture\n"
|
||||
"#define textureCube texture\n"
|
||||
"#define shadow2DEXT texture\n"
|
||||
"out vec4 fragColor;\n");
|
||||
} else {
|
||||
// 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) {
|
||||
Core::viewportDef = Viewport(x, y, w, h);
|
||||
Core::viewportDef = short4(x, y, w, h);
|
||||
Core::x = x;
|
||||
Core::y = y;
|
||||
Core::width = w;
|
||||
|
Loading…
x
Reference in New Issue
Block a user