Next patch

This commit is contained in:
2026-02-24 23:46:31 -08:00
parent 85a44b930d
commit cc95912a7e
4 changed files with 1559 additions and 990 deletions

View File

@ -227,7 +227,7 @@ class SystemImpl {
}
static inline var maxGamepads: Int = 4;
static var frame: Framebuffer;
public static var frame: Framebuffer;
static var keyboard: Keyboard = null;
static var mouse: kha.input.Mouse;
static var surface: Surface;
@ -388,7 +388,8 @@ class SystemImpl {
{
alpha: false,
antialias: options.framebuffer.samplesPerPixel > 1,
stencil: true
stencil: true,
xrCompatible: true
}); // preserveDrawingBuffer: true } ); Warning: preserveDrawingBuffer can cause huge performance issues on mobile browsers
SystemImpl.gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1);
@ -417,7 +418,8 @@ class SystemImpl {
{
alpha: false,
antialias: options.framebuffer.samplesPerPixel > 1,
stencil: true
stencil: true,
xrCompatible: true
}); // preserveDrawingBuffer: true } ); WARNING: preserveDrawingBuffer causes huge performance issues (on mobile browser)!
SystemImpl.gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1);
SystemImpl.gl.getExtension("OES_texture_float");
@ -547,6 +549,12 @@ class SystemImpl {
];
function animate(timestamp) {
if (untyped Browser.window._khaSkipWindowRender == true) {
if (requestAnimationFrame != null)
requestAnimationFrame(animate);
return;
}
if (requestAnimationFrame == null)
Browser.window.setTimeout(animate, 1000.0 / 60.0);
else

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -157,4 +157,5 @@ extern class Krom {
static function getConstantLocationCompute(shader: Dynamic, name: String): Dynamic;
static function getTextureUnitCompute(shader: Dynamic, name: String): Dynamic;
static function compute(x: Int, y: Int, z: Int): Void;
static function viewportSetCamera(posX: Float, posY: Float, posZ: Float, rotX: Float, rotY: Float, rotZ: Float, rotW: Float): Void;
}