Fidding around with OGLES branch , found that i can't build OGLES2/SDL without EGL being involved. I.e. in the CirrDeviceSDL.cpp we have:
Code: Select all
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;
Qestion is: what reassons to add to pure SDL managment also EGL parts for GLES2 , and how to get rid of them so to be able to use SDL only, without EGL ?
I see that ogles2 code was added for EMSCRIPTEN , but it will also work for other platforms as well , if only remove from CirrDeviceSDL.cpp that code about ContextnManager as EGLManager. In the CirrDeviceLinux, it also used with EGL, but that ok, as it non SDL, but for "pure" OGLES2-SDL compile , EGL should't be used, imho.
I also see that for OpenGL, BurningsVideo, Software and DirectX, just pure "VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this);" is used. Why not use that "this" thing for OGLES2 as well without needs for EGL manager ?
All in all, maybe can anyone explain logic of it, so it can be somehow removed and replaced on SDL only ?
Thanks a bunch for answers !