Tiny Core Base > Raspberry Pi
raylib on picore 14.1.0 without X
(1/1)
Chau:
I am trying to setup my picore installation so I can compile raylib in native mode without using X. I am running on a RPI0W using picore 14.1.0.
I have:
* At least loaded compiletc, libEGL-dev and libdrm-dev (and a few more)
* Changed the include path in the raylib makefile to point to /usr/include/drm instead of /usr/include/libdrm
Is it suppose to be /usr/include/libdrm or /usr/include/drm? I have a /usr/include/drm folder.
I compile by running
--- Code: ---> make PLATFORM=PLATFORM_DRM
--- End code ---
But it fails with this error:
--- Code: ---platforms/rcore_drm.c: In functon 'InitPlatform':
platforms/rcore_drm.c: 972:67; error: 'EGL_OPENGL_ES3_BIT' undeclared (first use in this function); did you mean 'EGL_OPENGL_ES2_BUT'?
--- End code ---
Does anyone have a clue to why it doesn't work and maybe what I am doing wrong?
Regards, Casper
patrikg:
Take the easy route first, try to compile the raylib within the Raspberry Pi OS.
And then to picore, so you get a feeling what you are doing. and how that can be applied to picore.
Rich:
Hi Chau
Which source code package are you using?
I downloaded the zip file from here:
https://github.com/raysan5/raylib
A search for EGL_OPENGL_ES3_BIT in that package turned up this:
--- Code: ---tc@E310:~/Raylib/raylib-890058abcd6e3c03fe2c59ebb416db1e8b75446f$ grep -Rin "EGL_OPENGL_ES3_BIT" *
src/platforms/rcore_template.c:454: EGL_RENDERABLE_TYPE, (rlGetVersion() == RL_OPENGL_ES_30)? EGL_OPENGL_ES3_BIT : EGL_OPENGL_ES2_BIT, // Type of context support
src/platforms/rcore_drm.c:74:#ifndef EGL_OPENGL_ES3_BIT
src/platforms/rcore_drm.c:75: #define EGL_OPENGL_ES3_BIT 0x40
src/platforms/rcore_drm.c:834: EGL_RENDERABLE_TYPE, (rlGetVersion() == RL_OPENGL_ES_30)? EGL_OPENGL_ES3_BIT : EGL_OPENGL_ES2_BIT, // Type of context support
src/platforms/rcore_android.c:819: EGL_RENDERABLE_TYPE, (rlGetVersion() == RL_OPENGL_ES_30)? EGL_OPENGL_ES3_BIT : EGL_OPENGL_ES2_BIT, // Type of context support
--- End code ---
So lines 74 and 75 in rcore_drm.c ensure EGL_OPENGL_ES3_BIT is defined
before it is needed on line 834.
Rich:
Hi Chau
One more thing, rcore_drm.c contains the line:
--- Code: ---#include "EGL/egl.h" // Native platform windowing system interface
--- End code ---
If you look in EGL/egl.h you'll find it defines EGL_OPENGL_ES3_BIT:
--- Code: ---#ifndef EGL_VERSION_1_5
#define EGL_VERSION_1_5 1
typedef void *EGLSync;
typedef intptr_t EGLAttrib;
typedef khronos_utime_nanoseconds_t EGLTime;
typedef void *EGLImage;
#define EGL_CONTEXT_MAJOR_VERSION 0x3098
#define EGL_CONTEXT_MINOR_VERSION 0x30FB
#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
#define EGL_NO_RESET_NOTIFICATION 0x31BE
#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
#define EGL_OPENGL_ES3_BIT 0x00000040
----- Snip -----
--- End code ---
But it only does that if EGL_VERSION_1_5 has not already
been defined somewhere else in the build process.
patrikg:
Here some more instructions. You need some dev deps.
--- Code: ---libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev
--- End code ---
https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi#compiling-raylib-source-code
Navigation
[0] Message Index
Go to full version