Thanks for the idea Greg,
Line 1362 of Display.cpp
Code:
if(MainContext.context=glXCreateContextAttribsARB(XDisplay, GLConfig, null, true, attribs))break; // stop on first found
Generates segfault. Again this may be just because of VMwares gfx driver..
For my purposes, it seems like the problem is XDisplay != null/false when the APP_ALLOW_NO_XDISPLAY is set (line 821 of Application.cpp):
..which I guess makes sense since it is "ALLOW" and not "SET" or "FORCE". Basically I am trying to run esenthel as a terminal app from Desktop (w/ Xwindows) Ubuntu, not actually a real "
headless" environment. I'm trying to do so for dev purposes, the real goal is a real
headless environment with regards to
linux.
So I changed two lines in Application::create1() in Application.cpp to:
Code:
Bool Application::create1()
{
if(LogInit)LogN("InitPre");
InitPre();
#if LINUX
if(flag&APP_ALLOW_NO_XDISPLAY)XDisplay=null; //FORCE HEADLESS
if(!XDisplay && !(flag&APP_ALLOW_NO_XDISPLAY))Exit("Can't open XDisplay");
#endif
if(!testInstance())return false;
windowCreate();
InitSound ();
if(!InputDevices.create())Exit(MLTC(u"Can't create DirectInput", PL,u"Nie można utworzyć DirectInput"));
if(!(flag&APP_ALLOW_NO_XDISPLAY))if(!D.create())return false; //FORCE HEADLESS
#if ANDROID
if(_stay_awake){AWAKE_MODE temp=_stay_awake; _stay_awake=AWAKE_OFF; stayAwake(temp);} // on Android we need to apply this after window was created
#endif
if(LogInit)LogN("Init");
if(!Init ())return false;
return true;
}
And with limited testing it seems to work as I expect now.