Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] CMake: support OpenGL ES3 in LibraryConfigurations.cmake #4079

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

manuel5975p
Copy link
Contributor

Only put ES2 as a fallback if GRAPHICS is not specified.

if(NOT GRAPHICS)
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
elseif(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -sFULL_ES3=1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For GLFW this is put in target_link_options, rather than CMAKE_EXE_LINKER_FLAGS.
Could you do that instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's better, yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it

@raysan5 raysan5 changed the title Allow ES3 in LibraryConfigurations.cmake [build] CMake: support OpenGL ES3 in LibraryConfigurations.cmake Jun 20, 2024
@Peter0x44
Copy link
Contributor

LGTM! approved.

@Peter0x44
Copy link
Contributor

Actually, one last nit:
emscripten documents the option as -sFULL_ES3 and not -sFULL_ES3=1

To enable OpenGL ES 3.0 emulation, specify the emcc option -sFULL_ES3 when linking the final executable (.js/.html) of the project.

Change that and all should be fine.

@raysan5 raysan5 merged commit e7acdd1 into raysan5:master Jun 21, 2024
14 checks passed
@raysan5
Copy link
Owner

raysan5 commented Jun 21, 2024

@Peter0x44 ouch! just merged to quickly, please @manuel5975p send a patch

@manuel5975p
Copy link
Contributor Author

Doesn't another part of the emscripten doc say that -sOPTION is exactly equivalent to -sOPTION=1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants