22w14c Made some (maybe) performance changes
This commit is contained in:
parent
6946edc396
commit
767864ad1a
94123
javascript/classes.js
94123
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@ public class ConfigConstants {
|
||||||
|
|
||||||
public static boolean profanity = false;
|
public static boolean profanity = false;
|
||||||
|
|
||||||
public static final String version = "22w14b";
|
public static final String version = "22w14c";
|
||||||
public static final String mainMenuString = "eaglercraft " + version;
|
public static final String mainMenuString = "eaglercraft " + version;
|
||||||
|
|
||||||
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
||||||
|
|
|
@ -377,7 +377,7 @@ public class EaglerAdapterImpl2 {
|
||||||
private static boolean enableRepeatEvents = false;
|
private static boolean enableRepeatEvents = false;
|
||||||
private static boolean isWindowFocused = true;
|
private static boolean isWindowFocused = true;
|
||||||
|
|
||||||
@JSBody(params = { }, script = "return {antialias: false, depth: true, powerPreference: \"high-performance\", desynchronized: false, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};")
|
@JSBody(params = { }, script = "return {antialias: false, depth: true, powerPreference: \"high-performance\", desynchronized: true, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};")
|
||||||
public static native JSObject youEagler();
|
public static native JSObject youEagler();
|
||||||
|
|
||||||
public static final int _wGL_TEXTURE_2D = TEXTURE_2D;
|
public static final int _wGL_TEXTURE_2D = TEXTURE_2D;
|
||||||
|
@ -984,14 +984,30 @@ public class EaglerAdapterImpl2 {
|
||||||
|
|
||||||
@JSBody(params = { "obj" }, script = "if(obj.commit) obj.commit();")
|
@JSBody(params = { "obj" }, script = "if(obj.commit) obj.commit();")
|
||||||
private static native int commitContext(JSObject obj);
|
private static native int commitContext(JSObject obj);
|
||||||
|
|
||||||
|
@JSBody(params = { "obj", "def" }, script = "return window.eagler && (typeof window.eagler[obj] === 'boolean' ? window.eagler[obj] : def);")
|
||||||
|
private static native boolean getJavascriptFlag(String obj, boolean def);
|
||||||
|
|
||||||
|
@JSBody(params = { "obj" }, script = "return typeof obj === 'boolean';")
|
||||||
|
private static native boolean hasJavascriptFlag(String obj);
|
||||||
|
|
||||||
|
@Async
|
||||||
|
private static native Object delayFor0Millis();
|
||||||
|
|
||||||
|
private static void delayFor0Millis(AsyncCallback<Object> cb) {
|
||||||
|
Window.setTimeout(new TimerHandler() {
|
||||||
|
@Override
|
||||||
|
public void onTimer() {
|
||||||
|
cb.complete(null);
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
public static final void updateDisplay() {
|
public static final void updateDisplay() {
|
||||||
commitContext(webgl);
|
//if(getJavascriptFlag("displayUpdateCommitContext", true)) {
|
||||||
try {
|
commitContext(webgl);
|
||||||
Thread.sleep(1l);
|
//}
|
||||||
} catch (InterruptedException e) {
|
delayFor0Millis();
|
||||||
;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public static final void setVSyncEnabled(boolean p1) {
|
public static final void setVSyncEnabled(boolean p1) {
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user