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