Examples: Emscripten+GLFW: revert to use a shell_minimal.html closer to vanilla one, as our fullscreen + misc tweaks to Emscripten+SDL example to match other version.

This commit is contained in:
ocornut
2023-02-02 15:02:18 +01:00
parent 0370856d78
commit b51919dce1
5 changed files with 24 additions and 20 deletions

View File

@ -32,9 +32,9 @@ EMS =
##---------------------------------------------------------------------
# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only)
EMS += -s USE_GLFW=3
EMS += -s DISABLE_EXCEPTION_CATCHING=1
LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1
LDFLAGS += -s USE_GLFW=3 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1
# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877)
#EMS += -s BINARYEN_TRAP_MODE=clamp
@ -60,7 +60,8 @@ endif
CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
#CPPFLAGS += -g
CPPFLAGS += -Wall -Wformat -Os $(EMS)
LDFLAGS += --shell-file shell_minimal.html $(EMS)
LDFLAGS += --shell-file shell_minimal.html
LDFLAGS += $(EMS)
##---------------------------------------------------------------------
## BUILD RULES

View File

@ -6,7 +6,7 @@
<title>Dear ImGui GLFW+Emscripten example</title>
<style>
body { margin: 0; background-color: black }
.emscripten {
/*.emscripten {
position: absolute;
top: 0px;
left: 0px;
@ -24,7 +24,8 @@
image-rendering: crisp-edges;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}
}*/
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
</style>
</head>
<body>