Ubuntu 22.04 LTS. Tried on both X11 and Wayland, Nvidia and AMD GPUs. glxgears and glmark2 all worked fine on the systems. glxinfo | grep -i opengl also said everything is good. But always would get:
"Couldn't find valid GL Config"
When trying to run the Engine Builder.
Needed to change Windows.cpp like this:
Code:
// GL Config
int attribs[]=
{
GLX_X_RENDERABLE , true,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE , GLX_RGBA_BIT,
GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR,
GLX_RED_SIZE , 8,
GLX_GREEN_SIZE , 8,
GLX_BLUE_SIZE , 8,
GLX_ALPHA_SIZE , 8,
//#if SUPPORT_STENCIL
// GLX_DEPTH_SIZE , 24,
// GLX_STENCIL_SIZE , 8,
//#else
// GLX_DEPTH_SIZE , 32,
// GLX_STENCIL_SIZE , 0,
//#endif
GLX_DOUBLEBUFFER , true,
#if LINEAR_GAMMA && 0 // disable because this fails on Ubuntu 21.04
GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, LINEAR_GAMMA,
#endif
NULL // end of list
};
int count=0; if(GLXFBConfig *fbc=glXChooseFBConfig(XDisplay, DefaultScreen(XDisplay), attribs, &count))
{
if(count>=1)GLConfig=fbc[0];
XFree(fbc);
}
if(!GLConfig)Exit("Couldn't find valid GL Config");
Next, running the engine builder (all things checked, select "Do selected")
Get this error:
Code:
./../../../Editor/Bin/Engine/_/inline.h:1798:90: error: no member named 'cleanup' in 'Cache<TYPE>'; did you mean simply 'cleanup'?
T1(TYPE) Cache<TYPE>& Cache<TYPE>::cleanup ( ) { super::cleanup ( ); return T;}
Changed inline.h like this:
Code:
/******************************************************************************/
// CACHE
/******************************************************************************/
T1(TYPE) Cache<TYPE>& Cache<TYPE>::clear ( ) { super::clear ( ); return T;}
T1(TYPE) Cache<TYPE>& Cache<TYPE>::del ( ) { super::del ( ); return T;}
//T1(TYPE) Cache<TYPE>& Cache<TYPE>::cleanup ( ) { super::cleanup ( ); return T;}
T1(TYPE) Cache<TYPE>& Cache<TYPE>::cleanup() {
_Cache::cleanup(); // Replace `super` with `_Cache`
return *this;
}
And moved cleanup to "protected"
Code:
struct _Cache // Cache (base) - Do not use this class, use 'Cache' instead
{
struct Desc
{
Str file; // file name
UInt flag, ptr_num;
};
struct Elm
{
};
Int elms()C {return _elms;}
void lock()C;
void unlock()C;
~_Cache() {del();}
protected:
void cleanup(); // Now accessible to derived classes
Next got these errors during Editor building step:
Code:
./../../../Editor/Bin/Engine/File/Pak.h:369:9: error: no member named 'close' in 'EE::File'
f.close(); return false;
~ ^
./../../../Editor/Bin/Engine/File/Pak.h:416:11: error: 'name' is a private member of 'EE::SPak'
if(!name.is())return true;
^
./../../../Editor/Bin/Engine/File/Pak.h:322:9: note: declared private here
Str name;
^
./../../../Editor/Bin/Engine/File/Pak.h:417:22: error: 'name' is a private member of 'EE::SPak'
Str temp_name=name+"@new";
^
./../../../Editor/Bin/Engine/File/Pak.h:322:9: note: declared private here
Str name;
Had to make these changes..
Moved void close() out of private in File.h:
Code:
struct File
{
void close ( ); // close the file without releasing helper memory
// manage
#if EE_PRIVATE
void zeroNoBuf( );
void zero ( );
void delBuf ( );
Bool setBuf (Int size); // set the buffer to be at least of 'size', false on fail
#endif
Made this change in Pak.h:
Moved name out of private in the SPak struct
Code:
Str name;
#if !EE_PRIVATE
private:
#endif
File f;
//Str name;
Memc<DataRangeAbs> used_file_ranges;
};
With these changes the Editor runs.