Closed geekynils closed 1 year ago
Hi, try passing -s USE_WEBGL2=1
to the linker step (it's also mentioned in the changelog entry from 30-Apr): https://github.com/floooh/sokol/blob/master/CHANGELOG.md
Unfortunately Emscripten still defaults to WebGL1, but requires the above linker option to propely link with WebGL2.
PS: I actually just fixed the cimgui-sokol-starterkit project, see here:
Ah I overlooked that and thought it is a problem with OpenGL on my Mac. Thank you so much!
This is slightly off-topic since it is not a sokol problem. Unfortunately I do not know where to ask and could not find the answer in the
CMakeLists.txt
files fromsokol-samples
.I upgraded my app to WebGL 2 since WebGL 1 is no longer supported by sokol. However I now run into linker problems on my Mac:
I tried two things to fix this:
Using the OpenGL package in the cmake file with
find_package(OpenGL)
and then addingtarget_link_libraries(my_app sokol imgui ${OPENGL_LIBRARIES})
which ended with the same error.
Adding
target_link_libraries(my_app PUBLIC "-framework OpenGL")
did not work either, I kind of expected this because the emscripten compiler is not an apple tool.Compiling the sokol samples for the web (
webgl2-emsc-make-release
) was not an issue, I guess fips somehow takes care of OpenGL dependencies. I just could not figure out what it does.