Clean opengl rendering.

This commit is contained in:
James Grogan 2022-11-16 09:39:05 +00:00
parent 4849d83fcf
commit 798cb365d7
19 changed files with 483 additions and 274 deletions

View file

@ -60,7 +60,6 @@ void XcbGlInterface::setupContext(int default_screen)
glXGetFBConfigAttrib(mDisplay, mConfig, GLX_VISUAL_ID, &visualID);
/* Create OpenGL context */
std::cout << "Creating opengl context" << std::endl;
mContext = glXCreateNewContext(mDisplay, mConfig, GLX_RGBA_TYPE, 0, True);
if (!mContext)
{

View file

@ -55,6 +55,21 @@ bool XcbGlWindowInterface::initialize(xcb_window_t window)
return false;
}
if (auto context = glXGetCurrentContext())
{
MLOG_INFO("Has valid GL context");
}
else
{
MLOG_INFO("No valid GL context");
}
int major_version{0};
int minor_version{0};
glGetIntegerv(GL_MAJOR_VERSION, &major_version);
glGetIntegerv(GL_MINOR_VERSION, &minor_version);
MLOG_INFO("Using opengl version " << major_version << "|" << minor_version);
return true;
}