mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-16 01:54:38 +02:00
#15 fix OGL ES platforms
This commit is contained in:
@@ -358,15 +358,16 @@ namespace GAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char defines[1024];
|
char defines[1024];
|
||||||
sprintf(defines, "#define PASS_%s\n", passNames[pass]);
|
defines[0] = 0;
|
||||||
|
|
||||||
for (int i = 0; i < defCount; i++) {
|
for (int i = 0; i < defCount; i++) {
|
||||||
#ifdef _GAPI_GLES
|
#ifdef _GAPI_GLES
|
||||||
if (def[i] == SD_SHADOW_SAMPLER)
|
if (def[i] == SD_SHADOW_SAMPLER)
|
||||||
strcat(ext, "#extension GL_EXT_shadow_samplers : require\n");
|
strcat(defines, "#extension GL_EXT_shadow_samplers : require\n"); // ACHTUNG! must be first in the list
|
||||||
#endif
|
#endif
|
||||||
sprintf(defines, "%s#define %s\n", defines, DefineName[def[i]]);
|
sprintf(defines, "%s#define %s\n", defines, DefineName[def[i]]);
|
||||||
}
|
}
|
||||||
|
sprintf(defines, "%s#define PASS_%s\n", defines, passNames[pass]);
|
||||||
|
|
||||||
char fileName[255];
|
char fileName[255];
|
||||||
// generate shader file path
|
// generate shader file path
|
||||||
|
@@ -65,7 +65,7 @@ JNI_METHOD(void, nativeInit)(JNIEnv* env, jobject obj, jstring contentDir, jstri
|
|||||||
strcat(Stream::cacheDir, str);
|
strcat(Stream::cacheDir, str);
|
||||||
env->ReleaseStringUTFChars(cacheDir, str);
|
env->ReleaseStringUTFChars(cacheDir, str);
|
||||||
|
|
||||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&Core::defaultFBO);
|
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&GAPI::defaultFBO);
|
||||||
Game::init();
|
Game::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ JNI_METHOD(void, nativeReset)(JNIEnv* env) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JNI_METHOD(void, nativeUpdate)(JNIEnv* env) {
|
JNI_METHOD(void, nativeUpdate)(JNIEnv* env) {
|
||||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&Core::defaultFBO);
|
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&GAPI::defaultFBO);
|
||||||
|
|
||||||
Game::update();
|
Game::update();
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ JNI_METHOD(void, nativeFrameBegin)(JNIEnv* env) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JNI_METHOD(void, nativeFrameEnd)(JNIEnv* env) {
|
JNI_METHOD(void, nativeFrameEnd)(JNIEnv* env) {
|
||||||
Core::setBlending(bmNone);
|
Core::setBlendMode(bmNone);
|
||||||
Core::validateRenderState();
|
Core::validateRenderState();
|
||||||
|
|
||||||
Game::frameEnd();
|
Game::frameEnd();
|
||||||
@@ -101,7 +101,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 = vec4(float(x), float(y), float(w), float(h));
|
Core::viewportDef = Viewport(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