Fix GL viewport sizing and ship a real playable default table
The OpenGL back-buffer render target was created with the window's logical/CSS size instead of its device-pixel size, so on any browser tab with devicePixelRatio != 1 the GL viewport only covered a fraction of the canvas's actual backing buffer (rendering anchored bottom-left, matching GL's viewport origin) - confirmed against a live repro and fixed to match the convention already used by the BGFX backend elsewhere in the same file. Also swap the bundled default table from test000-default-table.vpx (upstream's rendering/component regression-test fixture, which has no gameplay script) to exampleTable.vpx - a genuine playable demo table with working flippers, slingshots, bumpers, targets and a plunger - confirmed keyboard input and audio now work end-to-end through it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -45,7 +45,7 @@ EMSCRIPTEN_LINK_FLAGS=(
|
||||
-sENVIRONMENT=web
|
||||
-sEXPORTED_RUNTIME_METHODS=FS,ccall,cwrap
|
||||
-sFORCE_FILESYSTEM=1
|
||||
-sEXPORTED_FUNCTIONS=_main,_vpinball_wasm_start,_vpinball_wasm_stop,_vpinball_wasm_dispose
|
||||
-sEXPORTED_FUNCTIONS=_main,_vpinball_wasm_start,_vpinball_wasm_stop,_vpinball_wasm_dispose,_vpinball_wasm_eval_script
|
||||
-sEXIT_RUNTIME=0
|
||||
--use-preload-cache
|
||||
)
|
||||
@@ -80,7 +80,7 @@ cp "$BUILD_DIR"/vpinball.wasm "$DIST_DIR/" 2>/dev/null || true
|
||||
cp "$BUILD_DIR"/vpinball.data "$DIST_DIR/" 2>/dev/null || true
|
||||
|
||||
mkdir -p "$ROOT_DIR/package/assets"
|
||||
cp "$VPINBALL_DIR/tests/assets/test000-default-table.vpx" "$ROOT_DIR/package/assets/default.vpx" 2>/dev/null || true
|
||||
cp "$VPINBALL_DIR/src/assets/exampleTable.vpx" "$ROOT_DIR/package/assets/default.vpx" 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "== build.sh complete =="
|
||||
|
||||
Reference in New Issue
Block a user