diff --git a/src/gapi/gl.h b/src/gapi/gl.h index 33c3b7a..11a37b6 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -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 diff --git a/src/platform/android/app/src/main/cpp/main.cpp b/src/platform/android/app/src/main/cpp/main.cpp index b7715f6..4f7248a 100644 --- a/src/platform/android/app/src/main/cpp/main.cpp +++ b/src/platform/android/app/src/main/cpp/main.cpp @@ -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;