You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With reference to several other issues (#1376, #4236, #1096, #215, #337, #1183), after reading them I didn't learn much.
Environment
Machine: Raspberry PI 2B
OS: Raspbian OS Lite
Protocol: Wayland
OpenGL: ES2.0
Desktop: Vivarium
Code Example
By trial and error, I managed to get raylib working on RPI as DESKTOP under OpenGL ES2, this way (in the raylib folder):
mkdir build
cd build
ccmake ..
This is what my chosen configuration looks like
Page 1 of 1
BUILD_EXAMPLES OFF
BUILD_SHARED_LIBS ON
CMAKE_BUILD_TYPE Debug
CMAKE_INSTALL_PREFIX /usr/local
CUSTOMIZE_BUILD OFF
ENABLE_ASAN OFF
ENABLE_MSAN OFF
ENABLE_UBSAN OFF
GLFW_BUILD_DOCS OFF
GLFW_BUILD_EXAMPLES OFF
GLFW_BUILD_TESTS OFF
GLFW_BUILD_WAYLAND ON
GLFW_BUILD_X11 OFF
GLFW_INSTALL OFF
GLFW_LIBRARY_TYPE OBJECT
INCLUDE_EVERYTHING OFF
OPENGL_VERSION ES 2.0
PLATFORM Desktop
USE_EXTERNAL_GLFW IF_POSSIBLE
WAYLAND_SCANNER_EXECUTABLE /usr/bin/wayland-scanner
WITH_PIC ON
glfw3_DIR glfw3_DIR-NOTFOUND
pthread /usr/lib/arm-linux-gnueabihf/libpthread.a
I have the GLFW library installed on my system, but raylib can't find it.
make -j4
sudo make install
Output:
[ 4%] Generating fractional-scale-v1-client-protocol.h
[ 4%] Generating xdg-shell-client-protocol.h
[ 6%] Generating fractional-scale-v1-client-protocol-code.h
[ 8%] Generating idle-inhibit-unstable-v1-client-protocol-code.h
[ 10%] Generating idle-inhibit-unstable-v1-client-protocol.h
[ 12%] Generating pointer-constraints-unstable-v1-client-protocol-code.h
[ 14%] Generating pointer-constraints-unstable-v1-client-protocol.h
[ 16%] Generating relative-pointer-unstable-v1-client-protocol-code.h
[ 18%] Generating relative-pointer-unstable-v1-client-protocol.h
[ 20%] Generating viewporter-client-protocol-code.h
[ 22%] Generating viewporter-client-protocol.h
[ 25%] Generating wayland-client-protocol-code.h
[ 29%] Generating xdg-activation-v1-client-protocol-code.h
[ 29%] Generating wayland-client-protocol.h
[ 31%] Generating xdg-activation-v1-client-protocol.h
[ 33%] Generating xdg-decoration-unstable-v1-client-protocol-code.h
[ 35%] Generating xdg-decoration-unstable-v1-client-protocol.h
[ 37%] Generating xdg-shell-client-protocol-code.h
[ 43%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/input.c.o
[ 43%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/context.c.o
[ 43%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/init.c.o
[ 45%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/monitor.c.o
[ 47%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/platform.c.o
[ 50%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/vulkan.c.o
[ 52%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/window.c.o
[ 54%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/egl_context.c.o
[ 56%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/osmesa_context.c.o
[ 58%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/null_init.c.o
[ 60%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/null_monitor.c.o
[ 62%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/null_window.c.o
[ 64%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/null_joystick.c.o
[ 66%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/posix_module.c.o
[ 68%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/posix_time.c.o
[ 70%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/posix_thread.c.o
[ 72%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/wl_init.c.o
[ 75%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/wl_monitor.c.o
[ 77%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/wl_window.c.o
[ 79%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/xkb_unicode.c.o
[ 81%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/linux_joystick.c.o
[ 83%] Building C object raylib/external/glfw/src/CMakeFiles/glfw.dir/posix_poll.c.o
[ 83%] Built target glfw
[ 87%] Building C object raylib/CMakeFiles/raylib.dir/raudio.c.o
[ 87%] Building C object raylib/CMakeFiles/raylib.dir/rcore.c.o
[ 89%] Building C object raylib/CMakeFiles/raylib.dir/rmodels.c.o
[ 91%] Building C object raylib/CMakeFiles/raylib.dir/rshapes.c.o
[ 93%] Building C object raylib/CMakeFiles/raylib.dir/rtext.c.o
[ 95%] Building C object raylib/CMakeFiles/raylib.dir/rtextures.c.o
[ 97%] Building C object raylib/CMakeFiles/raylib.dir/utils.c.o
[100%] Linking C shared library libraylib.so
[100%] Built target raylib
denis@raspberrypi:~/dev/raylib/build $
But I also need to verify the examples that everything actually works:
cd ../examples
make -j4
Of course, it fails again because as we know (we wrote about it here) these examples require glut to compile, which I don't have.
gcc -o others/raylib_opengl_interop others/raylib_opengl_interop.c -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result -O2 -D_DEFAULT_SOURCE -I. -I/home/denis/dev/raylib/src -I/home/denis/dev/raylib/src/external -I/usr/local/include -I/home/denis/dev/raylib/src/external/glfw/include -L. -L/home/denis/dev/raylib/src -L/home/denis/dev/raylib/src -L/usr/local/lib -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -latomic -latomic -DPLATFORM_DESKTOP -DPLATFORM_DESKTOP_GLFW
/usr/bin/ld: /tmp/ccF7fBVC.o: in function `main':
raylib_opengl_interop.c:(.text.startup+0x208): undefined reference to `glad_glGenVertexArrays'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x20c): undefined reference to `glad_glBindVertexArray'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x210): undefined reference to `glad_glGenBuffers'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x214): undefined reference to `glad_glBindBuffer'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x21c): undefined reference to `glad_glBufferData'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x224): undefined reference to `glad_glVertexAttribPointer'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x230): undefined reference to `glad_glUseProgram'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x234): undefined reference to `glad_glEnableVertexAttribArray'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x238): undefined reference to `glad_glEnable'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x248): undefined reference to `glad_glUniform1f'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x250): undefined reference to `glad_glUniform4fv'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x254): undefined reference to `glad_glUniformMatrix4fv'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x258): undefined reference to `glad_glDrawArrays'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x25c): undefined reference to `glad_glDeleteBuffers'
/usr/bin/ld: raylib_opengl_interop.c:(.text.startup+0x260): undefined reference to `glad_glDeleteVertexArrays'
collect2: error: ld returned 1 exit status
make: *** [Makefile:697: others/raylib_opengl_interop] Error 1
With this, at least part of the example can be tried:
There are some errors in the report WARNING: GLFW: Error: 65548 Description: Wayland: The platform does not support setting the window position but they are related to Vivarium. The report will be sent to the appropriate departments.
and also My Heard Beat cd ../models && ./models_bone_socket
Works and decent FPS 60 FPS (1000/16.5=60.6) I think FPS is limited by the refresh rate of the display. On my computer it runs at 144HZ..
When I tried RAYLIB under DRM, the FPS was 4! Basically now it's the same speed I achieved with my DRM implementationwithout RAYLIB as it is now with raylib..
So. As I already wrote, I read some issues here and there is nothing useful. It is written everywhere that raylib cannot support both DESKTOP and OpenGL ES2 at the same time. But it can, it just needs to be updated a bit in the documentation and instructions, and maybe even cmake?
The text was updated successfully, but these errors were encountered:
Now that I think about it, the other windows open correctly. Even mine, which use GLFW installed on the system, I mentioned that raylib doesn't see the GLFW system library.
This program uses the GLFW system library and opens correctly without reporting any warnings:
It is written everywhere that raylib cannot support both DESKTOP and OpenGL ES2 at the same time.
Where is this written?
raysan5
changed the title
Desktop platform and OpenGL ES2 at the same time. Is the documentation outdated?
[rcore] Desktop platform and OpenGL ES2 at the same time. Is the documentation outdated?
Dec 29, 2024
Issue description
With reference to several other issues (#1376, #4236, #1096, #215, #337, #1183), after reading them I didn't learn much.
Environment
Machine: Raspberry PI 2B
OS: Raspbian OS Lite
Protocol: Wayland
OpenGL: ES2.0
Desktop: Vivarium
Code Example
By trial and error, I managed to get raylib working on RPI as DESKTOP under OpenGL ES2, this way (in the
raylib
folder):This is what my chosen configuration looks like
I have the GLFW library installed on my system, but raylib can't find it.
Output:
But I also need to verify the examples that everything actually works:
Of course, it fails again because as we know (we wrote about it here) these examples require
glut
to compile, which I don't have.With this, at least part of the example can be tried:
Output:
There are some errors in the report
WARNING: GLFW: Error: 65548 Description: Wayland: The platform does not support setting the window position
but they are related to Vivarium. The report will be sent to the appropriate departments.and also My Heard Beat
cd ../models && ./models_bone_socket
Works and decent FPS
60 FPS (1000/16.5=60.6) I think FPS is limited by the refresh rate of the display. On my computer it runs at 144HZ..
When I tried
RAYLIB
underDRM
, the FPS was 4! Basically now it's the same speed I achieved with my DRM implementation without RAYLIB as it is now with raylib..So. As I already wrote, I read some issues here and there is nothing useful. It is written everywhere that
raylib
cannot support bothDESKTOP
andOpenGL ES2
at the same time. But it can, it just needs to be updated a bit in thedocumentation
and instructions, and maybe evencmake
?The text was updated successfully, but these errors were encountered: