Open BinBashBanana opened 3 years ago
I tried adding these to makefile.emscripten, which changed the error, but it still doesn't work.
HAVE_OPENGLES = 0
HAVE_GL_CONTEXT = 1
HAVE_GL_MODERN = 1
HAVE_OPENGL = 1
New error:
LD desmume_libretro.js
warning: undefined symbol: _Z21OGLCreateRenderer_3_2PP14OpenGLRenderer (referenced by top-level compiled C/C++ code)
warning: undefined symbol: _Z22OGLLoadEntryPoints_3_2v (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glActiveTextureARB (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glAlphaFunc (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glColorPointer (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glDisableClientState (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glDrawBuffer (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glEnableClientState (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glReadBuffer (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glScalef (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glTexCoordPointer (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glTexEnvi (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glTexImage1D (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glTexSubImage1D (referenced by top-level compiled C/C++ code)
warning: undefined symbol: glXGetProcAddress (referenced by top-level compiled C/C++ code)
warning: undefined symbol: pthread_attr_setschedpolicy (referenced by top-level compiled C/C++ code)
emscripten can't work with OpenGL like that. You'd have to create a port to WebGL or WebGPU. Also, wifi won't work either, and compiling with pthread is bad, too.
Basically, you're trying to do something that requires much, much bigger changes.
I got it down to only these 2 errors:
LD desmume_libretro.js
error: undefined symbol: _Z21OGLCreateRenderer_3_2PP14OpenGLRenderer (referenced by top-level compiled C/C++ code)
error: undefined symbol: _Z22OGLLoadEntryPoints_3_2v (referenced by top-level compiled C/C++ code)
Do you know how to fix them? Or were you saying that even if they were fixed, it wouldn't work?
It won't work if you're trying to use the GLX path. Desmume does context creation manually for only a few platform contexts. emscripten most likely won't wrap that code automatically.
I'm using EGL, where is the code for context creation so I can add it?
Oh... it might be a better idea to use GLES, is there a way to do that?
@BinBashBanana have you had any luck with this? it's a pity there is no working port for Emscripten.
No... though I now better understand how some of the GL stuff works... a little. Sorry.
don't worry hopefully one day it will work
It seems that ever since, the build for emscripten has been fixed, but I still can't get it working.
@BinBashBanana , I did successfully build it, even using your suggestions from your webretro
repository, but unfortunately it still doesn't work.
I can get stdio logs of desmume running, but the canvas
would not show anything, it just stays black.
Did you have any luck with it so far?
Hello, I am trying to build desmume for emscripten, and I want to use desmume gl. After modifiying wifi.cpp to support emscripten, I edited the emscripten section of Makefile.libretro to look like this:
I also edited OGLRender.h to include my system glx.h because for some reason the current one wasn't working.
The inital build works fine, but when I try to link it in the RetroArch repository, it fails with messages like this one:
Is this easily fixable, or is this not supported yet?