mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-14 19:04:44 +00:00
Error while compiling example_sdl3_opengl3 for Emscripten #6386
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#6386
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version: 1.89.6 WIP
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp
Compiler: Emscripten 3.1.36
Operating System: Windows
My Issue:
The provided example of using SDL3 backend for ImGui could not be compiled without changes to a backend source code. The result of running the build command right away after cloning the master branch:
The main thing I don't really understand, is that in the Makefile of the example there is nothing mentioned about SDL (neither linking or include).
At the same time, if the sources of SDL are provided (was using CMake for that), the error would be different:
And, this issue is fixed (just declaring
focused_windowin the specified above file), everything compiles successfully.Basically, I don't understand, why the provided example and building steps for it doesn't work and what would be the way to resolve this issue. Maybe the functionality of SDL3 just isn't implemented for Emscripten yet?
I get another error on
examples\example_sdl3_opengl3\main.cpp. The functionSDL_CreateWindow()now takes6 parameters (not 4 as in the code). Error from
clang-clwas:Not sure it's related to the above. But I patched like this:
And the program ran just fine.
On Emscripten support:
I don't believe Emscripten supports SDL3 yet.
I left the Makefile around as I am expecting it to happen as soon as SDL3 stabilize.
I have now pushed
216ae7dto make this clearer.On the
focused windowproblem, this was fixed on May 4 with5dc6013713On your
SDL_CreateWindow()problem: You seem to be using an older version of SDL3.SDL3 is currently in dev and is a fast moving target. In latest work branch that function has 4 parameters.