How to make OGL-ES branch for SDL be only SDL and not EGL ?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!

How to make OGL-ES branch for SDL be only SDL and not EGL ?

Postby kas1e » Thu Feb 08, 2018 8:10 pm

@All (and probably CuteAlien as one of active devs :) )

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:

cpp 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;
 


None of the other switches, like OpenGL, or BurningVideo, or Software, or DirectX, do have that "EGL" related strings, so it used pure SDL for.

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 !
kas1e
 
Posts: 31
Joined: Sun Jan 21, 2018 8:39 am

Re: How to make OGL-ES branch for SDL be only SDL and not EG

Postby CuteAlien » Fri Feb 09, 2018 12:55 pm

Basically - I got the patch like that and it worked (aka I got Irrlicht in the browser). There's not much reason beyond that. I wondered as well if EGL is really needed in this case or if I can get the context from SDL directly, but never found the time to experiment with that.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8533
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany


Return to Advanced Help

Who is online

Users browsing this forum: No registered users and 1 guest