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

OpenGLES 2.0 support on PLATFORM_DESKTOP #2840

Merged
merged 5 commits into from
Jan 10, 2023

Conversation

wtnbgo
Copy link
Contributor

@wtnbgo wtnbgo commented Dec 29, 2022

In the current version of raylib, if you specify OPENGL_VERSION="ES 2.0" when compiling the DESKTOP version, the GL Context at runtime is set correctly by glfw, but the OpenGL ES2 header file is missing, so it cannot be compiled

This is a diff to make it possible to compile and work using glad's gles2.h

# build on Windows/Linux/OSX
cmake -DOPENGL_VERSION="ES 2.0" -B build
cmake --build build
cd build/examples
# windows
./Debug/raylib_opengl_interop.exe
# linux/mac
./raylib_opengl_interop

On environments that do not support the OpenGL ES2 context, copying and deploying libEGL.dll and libGLESv2.dll (libEGL.dylib, libGLESv2.dylib on Mac OS) from ANGLE (or Chrome, etc.) and it will be loaded by egl and work correctly

src/rlgl.h Outdated Show resolved Hide resolved
src/rlgl.h Show resolved Hide resolved
examples/others/raylib_opengl_interop.c Show resolved Hide resolved
@raysan5 raysan5 merged commit f549f67 into raysan5:master Jan 10, 2023
@raysan5
Copy link
Owner

raysan5 commented Jan 10, 2023

@wtnbgo Thanks for the improvement! I'm merging and reviewing the missing bits.

futureapricot pushed a commit to futureapricot/raylib that referenced this pull request Oct 4, 2023
* OpenGLES 2.0 support on PLATFORM_DESKTOP

* exmples raylib_opengl_interop desktop GLES2 support

* rename gles2.h -> glad_gles2.h
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.

None yet

2 participants