Creating OpenGL utility class, consolidating number of OpenGL function objects

This commit is contained in:
Dan Paulat 2021-07-23 21:30:51 -05:00
parent c6a323247d
commit 59be110c10
10 changed files with 124 additions and 73 deletions

View file

@ -0,0 +1,23 @@
#pragma once
#include <QOpenGLFunctions_3_3_Core>
#define SCWX_GL_CHECK_ERROR() \
{ \
GLenum err; \
while ((err = p->gl_.glGetError()) != GL_NO_ERROR) \
{ \
BOOST_LOG_TRIVIAL(warning) << logPrefix_ << "GL Error: " << err \
<< ", " __FILE__ << ":" << __LINE__; \
} \
}
namespace scwx
{
namespace qt
{
using OpenGLFunctions = QOpenGLFunctions_3_3_Core;
} // namespace qt
} // namespace scwx