Skip to content

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

@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.

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