mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-18 21:43:48 +01:00
Remove debug code
This commit is contained in:
@@ -147,8 +147,4 @@ bool OpenGLAPI::Initialise()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void APIENTRY OpenGLAPI::DebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* msg, const void* userData) {
|
|
||||||
Console::Error::WriteLine(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* DISABLE_OPENGL */
|
#endif /* DISABLE_OPENGL */
|
||||||
|
|||||||
@@ -192,8 +192,6 @@ namespace OpenGLAPI
|
|||||||
{
|
{
|
||||||
bool Initialise();
|
bool Initialise();
|
||||||
void SetTexture(uint16 index, GLenum type, GLuint texture);
|
void SetTexture(uint16 index, GLenum type, GLuint texture);
|
||||||
|
|
||||||
void APIENTRY DebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* msg, const void* userData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace OpenGLState
|
namespace OpenGLState
|
||||||
|
|||||||
@@ -272,10 +272,6 @@ public:
|
|||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, requiredVersion.Major);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, requiredVersion.Major);
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, requiredVersion.Minor);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, requiredVersion.Minor);
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_context = SDL_GL_CreateContext(_window);
|
_context = SDL_GL_CreateContext(_window);
|
||||||
if (_context == nullptr)
|
if (_context == nullptr)
|
||||||
{
|
{
|
||||||
@@ -290,17 +286,6 @@ public:
|
|||||||
throw Exception("Unable to initialise OpenGL.");
|
throw Exception("Unable to initialise OpenGL.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove when OpenGL optimization is done
|
|
||||||
SDL_GL_SetSwapInterval(0);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
typedef void (APIENTRYP debugMessageCallback)(GLDEBUGPROC callback, const void *userParam);
|
|
||||||
debugMessageCallback glDebugMessageCallback = (debugMessageCallback) SDL_GL_GetProcAddress("glDebugMessageCallback");
|
|
||||||
if (glDebugMessageCallback != nullptr) {
|
|
||||||
glDebugMessageCallback(OpenGLAPI::DebugCallback, nullptr);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_drawingContext->Initialise();
|
_drawingContext->Initialise();
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|||||||
Reference in New Issue
Block a user