Skip to content

Trying to build on GLES platforms fails #14

@vanfanel

Description

@vanfanel

@alfrix:

I was trying to get this core to build on non-Xorg, GLES-based platforms like the Raspberry Pi or any X86 PC with no Xorg server running (RetroArch is know for running on KMS/DRM+GLES) but it fails:

../../gapi_gl.h:92:24: fatal error: GL/glx.h: No such file or directory
     #include <GL/glx.h>
                        ^
compilation terminated.

I am forcing compilation by defining a non-Xorg OS on core.h like this:

#elif __KMSDRM__
    #define _OS_KMSDRM 1
    #define _GAPI_GL   1
    #define _GAPI_GLES 1

    #define DYNGEOM_NO_VBO


and also using that OS on gapi_gl.h like this on line 48:

#elif defined(_OS_RPI) || defined(_OS_CLOVER) || defined(_OS_KMSDRM)

Then I added a new platform definition on the libretro platform Makefile, like this:

else ifeq ($(platform), rpi)
   TARGET := $(TARGET_NAME)_libretro.so
   fpic := -fPIC
   SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
   CXXFLAGS += -D__KMSDRM__
   CFLAGS += -D__KMSDRM__
   LIBS += -lpthread
   GLES = 1

And then it builds on the X-less Pi as intended, but all I get on loading PSX data is a segfault... Can you please test?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions