mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 12:10:52 -06:00
Compile fix in Pixelbuffer
This commit is contained in:
@@ -44,26 +44,26 @@ public:
|
||||
* All kinds of usage for pixel buffer objects as defined by the OpenGL standard.
|
||||
* See: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferData.xhtml
|
||||
*/
|
||||
enum class Usage {
|
||||
StreamDraw = GL_STREAM_DRAW,
|
||||
StreamRead = GL_STREAM_READ,
|
||||
StreamCopy = GL_STREAM_COPY,
|
||||
StaticDraw = GL_STATIC_DRAW,
|
||||
StaticRead = GL_STATIC_READ,
|
||||
StaticCopy = GL_STATIC_COPY,
|
||||
DynamicDraw = GL_DYNAMIC_DRAW,
|
||||
DynamicRead = GL_DYNAMIC_READ,
|
||||
DynamicCopy = GL_DYNAMIC_COPY
|
||||
enum class Usage : std::underlying_type_t<GLenum> {
|
||||
StreamDraw = static_cast<std::underlying_type_t<GLenum>>(GL_STREAM_DRAW),
|
||||
StreamRead = static_cast<std::underlying_type_t<GLenum>>(GL_STREAM_READ),
|
||||
StreamCopy = static_cast<std::underlying_type_t<GLenum>>(GL_STREAM_COPY),
|
||||
StaticDraw = static_cast<std::underlying_type_t<GLenum>>(GL_STATIC_DRAW),
|
||||
StaticRead = static_cast<std::underlying_type_t<GLenum>>(GL_STATIC_READ),
|
||||
StaticCopy = static_cast<std::underlying_type_t<GLenum>>(GL_STATIC_COPY),
|
||||
DynamicDraw = static_cast<std::underlying_type_t<GLenum>>(GL_DYNAMIC_DRAW),
|
||||
DynamicRead = static_cast<std::underlying_type_t<GLenum>>(GL_DYNAMIC_READ),
|
||||
DynamicCopy = static_cast<std::underlying_type_t<GLenum>>(GL_DYNAMIC_COPY)
|
||||
};
|
||||
|
||||
/**
|
||||
* Access hints for OpenGL buffer mapping
|
||||
* See: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glMapBuffer.xml
|
||||
*/
|
||||
enum class Access {
|
||||
ReadOnly = GL_READ_ONLY,
|
||||
WriteOnly = GL_WRITE_ONLY,
|
||||
ReadWrite = GL_READ_WRITE
|
||||
enum class Access : std::underlying_type_t<GLenum> {
|
||||
ReadOnly = static_cast<std::underlying_type_t<GLenum>>(GL_READ_ONLY),
|
||||
WriteOnly = static_cast<std::underlying_type_t<GLenum>>(GL_WRITE_ONLY),
|
||||
ReadWrite = static_cast<std::underlying_type_t<GLenum>>(GL_READ_WRITE)
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -414,6 +414,10 @@ void OpenSpaceEngine::destroy() {
|
||||
|
||||
void OpenSpaceEngine::initialize() {
|
||||
LTRACE("OpenSpaceEngine::initialize(begin)");
|
||||
|
||||
glbinding::Binding::useCurrentContext();
|
||||
glbinding::Binding::initialize();
|
||||
|
||||
// clear the screen so the user don't have to see old buffer contents from the
|
||||
// graphics card
|
||||
LDEBUG("Clearing all Windows");
|
||||
@@ -428,6 +432,7 @@ void OpenSpaceEngine::initialize() {
|
||||
std::make_unique<ghoul::systemcapabilities::OpenGLCapabilitiesComponent>()
|
||||
);
|
||||
|
||||
// @BUG: This will call OpenGL functions, should it should be in the initializeGL
|
||||
LDEBUG("Detecting capabilities");
|
||||
SysCap.detectCapabilities();
|
||||
|
||||
@@ -856,9 +861,6 @@ void OpenSpaceEngine::configureLogging() {
|
||||
void OpenSpaceEngine::initializeGL() {
|
||||
LTRACE("OpenSpaceEngine::initializeGL(begin)");
|
||||
|
||||
glbinding::Binding::useCurrentContext();
|
||||
glbinding::Binding::initialize();
|
||||
|
||||
LTRACE("OpenSpaceEngine::initializeGL::Console::initialize(begin)");
|
||||
try {
|
||||
_engine->_console->initialize();
|
||||
|
||||
Reference in New Issue
Block a user