@Capehill
Maybe you also will be in interest to look at : i find out wtf was wrong with ogles2 build back in days, see this piece of code in SDL device :
https://sourceforge.net/p/irrlicht/cod ... rrlicht/CIrrDeviceSDL.cppLine starting from 493 we do have:
case video::EDT_OGLES2:
#if defined(_IRR_COMPILE_WITH_OGLES2_) && defined(_IRR_EMSCRIPTEN_PLATFORM_)
{
video::SExposedVideoData data;
ContextManager = new video::CEGLManager();
ContextManager->initialize(CreationParams, data);
VideoDriver = video::createOGLES2Driver(CreationParams, FileSystem, ContextManager);
}
#else
os::Printer::log("No OpenGL-ES2 support compiled in.", ELL_ERROR);
#endif
break;
So, while they think that OGLES + SDL can be in use only in EMSCRIPTEN probabaly (and which i comment out), still , for unknown reassons they do use EGL manager there , to fill the params or something.
The remain author which still works on Irrliht do not know why that done like this (he didn't code that part), and why EGL used there at all.
Because if you will see few lines above, there you will see pure OpenGL, which used without any EGL, and all ok in that terms. Maybe that done because for EMSRIPTEN it can't be different ?
And if we go at the line from 44, we can see there such kind of code:
#ifdef _IRR_COMPILE_WITH_OPENGL_
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceSDL* device);
#endif
#if defined(_IRR_COMPILE_WITH_OGLES2_) && defined(_IRR_EMSCRIPTEN_PLATFORM_)
IVideoDriver* createOGLES2Driver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);
#endif
See, for pure OpenGL, we do use SDL devie, while for OGLES2 we do use this "contextmanager" created from EGL.
Why i do not know. More of it , i do not know then why this code then placed in SDLDevice.cpp then if they do use there EGLManger.
See there that EGLManager.cpp just in case:
https://sourceforge.net/p/irrlicht/cod ... /Irrlicht/CEGLManager.cpp But basically what is clear , is that they do use EGL on emscripten + ogles2, for unknown reassons and not SDL for context creation and stuff.
I feel there for real should be something easy to make it work for us without EGL.. I also can easy add SDL2 there instead of SDL1 (just like i do already for 1.8.4 OpenGL port), just need to understand firstly how to get rid of EGL.
EDIT: i compile it for SDL1, at least no linking or compiling errors, all i do is to replaced everywhere IContextManager* contextManager on CIrrDeviceSDL* device as with pure OpenGL it done.
So i compile simple test case , and it show me just black screen. I assume, that happens because our SDL1 can't handle OGLES2 ? I probabaly need to try to build debug version of SDL1 to see wtf happens when things runs, but then, if we didn't tell to SDL1 to enable OGLES2 (as it happens by default probabaly on EMSCRIPTEN) then it will be on opengl, and probabaly our SDL1 do not support OGLES2 at all, right ?
Through, it's not about direct support of ogles2, but about "rendering window context". Because basically if i open SDL1 window and create context with it, and then also open ogles2.library, and use calls from it to this window, and link against -lSDL -logles2, then theoreticaly it should render into the window, right ? Or we need somehow show the ogles2 to render exactly to SDL1 window on amigaos ? (while on EPSCRIPTEN that probabaly happens by default)
Edited by kas1e on 2022/9/21 21:11:40
Edited by kas1e on 2022/9/21 21:14:49
Edited by kas1e on 2022/9/21 21:52:33
Edited by kas1e on 2022/9/21 21:56:09