Added some more WebGL functions to gl_functions.js. Made the test_app render something more interesting. Added a bool return from App_UpdateAndRender which allows it to request that the application loop ends.

This commit is contained in:
2025-09-01 19:21:47 -07:00
parent 42cf6d9e9f
commit 81f5457b61
5 changed files with 150 additions and 29 deletions

View File

@@ -59,8 +59,9 @@ async function MainLoop()
console.log("Running!");
function renderFrame(currentTime)
{
appGlobals.wasmModule.exports.App_UpdateAndRender(currentTime);
window.requestAnimationFrame(renderFrame);
let shouldContinue = appGlobals.wasmModule.exports.App_UpdateAndRender(currentTime);
if (shouldContinue) { window.requestAnimationFrame(renderFrame); }
else { appGlobals.wasmModule.exports.App_Close(); }
}
window.requestAnimationFrame(renderFrame);
}