Clean opengl rendering.
This commit is contained in:
parent
4849d83fcf
commit
798cb365d7
19 changed files with 483 additions and 274 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue