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

Fix for running OpenGL ES2 with SDL on desktop #3542

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

realtradam
Copy link
Contributor

System: Artix Linux, Desktop PC


When trying to compile Raylib configured with SDL and OpenGL ES2 it will fail like the following:

2023-11-14-19:48:00

By editing rcore_desktop_sdl.c to not include SDL_opengl.h when compiling for OpenGL ES2 it compiles and works. See here:

2023-11-14-20:07:25

However when looking through the headerfiles of SDL I see there is a SDL_opengles2.h which I suspect should be used in place of SDL_opengl.h but it fails to compile when I do that. I am not entire sure why, I tried to do some digging but havent come up with anything yet, if anyone else has any insight it would be much appreciated however I think the current fix is sufficient.

I have not tested this yet on Windows or Mac. I can test it on Windows and Mac most likely sometime later this week or next week.

@raysan5 raysan5 merged commit e41a0c9 into raysan5:master Nov 18, 2023
14 checks passed
@raysan5
Copy link
Owner

raysan5 commented Nov 18, 2023

@realtradam thanks for the review! Afaik, OpenGL ES 2.0 could be supported in different ways:

  • On desktop, using the specific OpenGL extension for ES
  • On ES-specific platforms, directly using OpenGL ES

Probably this implementation could require some more work in the future...

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.

2 participants