Skip to content

Commit

Permalink
Merge pull request #12952 from fwcd/webgl2
Browse files Browse the repository at this point in the history
CMakeLists: Require WebGL 2.0 when building for Wasm
  • Loading branch information
daschuer authored Mar 11, 2024
2 parents 1727fd5 + 37d22a7 commit a928d1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2599,6 +2599,10 @@ else()
# Emscripten's FindOpenGL.cmake does not create OpenGL::GL
target_link_libraries(mixxx-lib PRIVATE ${OPENGL_gl_LIBRARY})
target_compile_definitions(mixxx-lib PUBLIC QT_OPENGL_ES_2)
# Require WebGL 2.0 (for a WebGL-friendly subset of OpenGL ES 3.0) and
# enable full OpenGL ES 2.0 emulation as per
# https://emscripten.org/docs/porting/multimedia_and_graphics/OpenGL-support.html
target_link_options(mixxx-lib PUBLIC -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sFULL_ES2=1)
else()
target_link_libraries(mixxx-lib PRIVATE OpenGL::GL)
endif()
Expand Down

0 comments on commit a928d1c

Please sign in to comment.