mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove debug code
This commit is contained in:
parent
aab5180afb
commit
acb5c68eac
|
@ -147,8 +147,4 @@ bool OpenGLAPI::Initialise()
|
|||
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 */
|
||||
|
|
|
@ -192,8 +192,6 @@ namespace OpenGLAPI
|
|||
{
|
||||
bool Initialise();
|
||||
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
|
||||
|
|
|
@ -272,10 +272,6 @@ public:
|
|||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, requiredVersion.Major);
|
||||
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);
|
||||
if (_context == nullptr)
|
||||
{
|
||||
|
@ -290,17 +286,6 @@ public:
|
|||
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();
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
|
|
Loading…
Reference in New Issue