Open vanfanel opened 5 years ago
I'm sorry, but i don't have a rpi or similar platform to test this
El lun., 10 de dic. de 2018 19:02, Manuel Alfayate Corchete < notifications@github.com> escribió:
@alfrix https://github.com/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 += -DKMSDRM CFLAGS += -DKMSDRM 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?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libretro/OpenLara/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMIBf6bg4e-KSQngkpYZQGbfWNUHMhcks5u3tnZgaJpZM4ZMQ8T .
@alfrix : Any GNU/Linux PC will do.
@alfrix : Trying to build a GLES version with current sources I get this:
../../gapi_gl.h:194:45: error: ‘void (* glGenerateMipmap)(GLenum)’ redeclared as different kind of symbol
PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
^~~~~~~~~~~~~~~~
In file included from ./libretro-common/include/glsym/rglgen_headers.h:55,
from ./libretro-common/include/glsym/rglgen.h:32,
from ./libretro-common/include/glsym/glsym.h:26,
from main.cpp:7:
/usr/include/GLES2/gl2.h:576:29: note: previous declaration ‘void glGenerateMipmap(GLenum)’
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
^~~~~~~~~~~~~~~~
In file included from ../../core.h:607,
from ../../game.h:4,
from main.cpp:11:
../../gapi_gl.h:207:45: error: ‘GLuint (* glCreateProgram)()’ redeclared as different kind of symbol
PFNGLCREATEPROGRAMPROC glCreateProgram;
^~~~~~~~~~~~~~~
In file included from ./libretro-common/include/glsym/rglgen_headers.h:55,
from ./libretro-common/include/glsym/rglgen.h:32,
from ./libretro-common/include/glsym/glsym.h:26,
from main.cpp:7:
/usr/include/GLES2/gl2.h:551:31: note: previous declaration ‘GLuint glCreateProgram()’
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
^~~~~~~~~~~~~~~
In file included from ../../core.h:607,
from ../../game.h:4,
from main.cpp:11:
It's much longer, but you get the idea. I believe something is wrong with these redefinitions... I use MESA GLES implementation, the most common in GNU/Linux.
you cannot just turn GLES on linux, you need to extensively modify gapi_gl to add your platform, otherwise it will assume desktop GL each time there is an defined(_OS_LINUX),
@alfrix : but "my platform" is libretro, as in src/platform/libretro. Asuming that Linux=DesktopGL is just plain wrong, as GLES/GLES2 is also widely used in Linux.
Is this core supposed to build on something like the Raspberry Pi?
i have only tested fedora and ubuntu, i have never seen a x86 distro that comes with gles but not gl, i'm no expert but you can tell by looking at the code, rpi is treated differently, but again i cannot test it, if you have it, try to fix it and make a PR
@alfrix : Desktop GNU/Linux distros are not to be used as a reference when it comes to libretro cores, since LR/RA main point is being able to run the cores in WAY more different ways inside the Linux ecosystem, like SBCs (Pi, etc), consoles (NES/SNES/PSX Classics), etc...
I will give it a go, but I need your help. Can I meet you on IRC or any other method for a fluid comunication?
Most LR/RA devs, including maintainers hangout on the Discord channel ask your question directly on #programming https://discord.gg/GZJKWjJ the IRC channel is much less populated http://webchat.freenode.net/?channels=%23retroarch&uio=d4 note that there is a bridge (retrobot) between IRC and discord of the channel #retroarch
@alfrix : I don't need general RA/LR or programming advice, but help with the OpenLara core, so I need to contact you.
i go there regularly, you can PM me if you prefer it, once you join the channel. you can also find xproger in https://discord.gg/6mc4Jw
@alfrix : Does xprogger also collaborate in the libretro port?
@vanfanel I'll help all I can :)
@XProger : Do you use IRC? What server/channel?
@vanfanel nope, only discord and telegram
Can you guys send me a new invite or tell me how to join again? This discord stuff is new to me...
TombRaider https://discord.gg/3JUqPgV https://discord.gg/3JUqPgV Libretro: https://discord.gg/GZJKWjJ https://discord.gg/GZJKWjJ
El sáb., 29 de dic. de 2018 a la(s) 14:39, Manuel Alfayate Corchete ( notifications@github.com) escribió:
Can you guys send me a new invite or tell me how to join again? This discord stuff is new to me...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libretro/OpenLara/issues/14#issuecomment-450508413, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMIBVSIv4_eeSIKqN5eFV8WV7F4RfAAks5u96jugaJpZM4ZMQ8T .
-- Alfredo Monclus
@alfrix @XProger
I am writting concise instructions to build OpenLara on RetroArch using GLES instead of Desktop OpenGL. It's very easy and NO Raspberry Pi is needed, any desktop GNU/Linux computer will do, because MESA has GLES implemented for desktop systems too.
1) Build RetroArch in GLES mode: ./configure --enable-opengles --disable-qt make
2) Try to build OpenLara Libretro for GLES: make GLES=1
You can easily see why it fails. It's the only core not compatible with GLES on Linux, but I am sure it's easy for you to fix it, since the core itself has GLES code already (in fact, this core is supposed to run on the Switch, which only has GLES, isn't it?).
@vanfanel @XProger I just fixed this. OpenLara LibRetro now works on GLES RetroArch too:
@alfrix : GLES is broken again (it builds, but does not display anything). It's not your fault. Please merge latest upstream changes to get it working again.
@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:
I am forcing compilation by defining a non-Xorg OS on core.h like this:
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:
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?