From 6f96155f5cb90dff93da21444d8586aca1ade17b Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Mon, 30 Sep 2024 07:25:53 +0200 Subject: [PATCH] hello_imgui_build_lib.cmake: if emscripten, use OpenGl Es3 --- hello_imgui_cmake/hello_imgui_build_lib.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hello_imgui_cmake/hello_imgui_build_lib.cmake b/hello_imgui_cmake/hello_imgui_build_lib.cmake index 7d1e7685..56fe09ae 100644 --- a/hello_imgui_cmake/hello_imgui_build_lib.cmake +++ b/hello_imgui_cmake/hello_imgui_build_lib.cmake @@ -736,6 +736,11 @@ function(him_has_opengl3 target) if (IOS OR EMSCRIPTEN) set(HELLOIMGUI_USE_GLAD OFF CACHE INTERNAL "" FORCE) + target_compile_definitions(${target} + PUBLIC + IMGUI_IMPL_OPENGL_ES3 + HELLOIMGUI_USE_GLES3 + ) else() set(HELLOIMGUI_USE_GLAD ON CACHE INTERNAL "" FORCE) endif()