From 14885c24dc4e8d2268dfd0ef94c554e3a75d7509 Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Fri, 31 Aug 2018 16:34:50 +0100 Subject: [PATCH] Move opengl debuging from RW_PROFILER, it interferes with CPU timing. --- rwengine/src/render/OpenGLRenderer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rwengine/src/render/OpenGLRenderer.cpp b/rwengine/src/render/OpenGLRenderer.cpp index a3459519..a214f23a 100644 --- a/rwengine/src/render/OpenGLRenderer.cpp +++ b/rwengine/src/render/OpenGLRenderer.cpp @@ -129,7 +129,7 @@ void OpenGLRenderer::useDrawBuffer(DrawBuffer* dbuff) { glBindVertexArray(dbuff->getVAOName()); currentDbuff = dbuff; bufferCounter++; -#ifdef RW_PROFILER +#ifdef RW_GRAPHICS_STATS if (currentDebugDepth > 0) { profileInfo[currentDebugDepth - 1].buffers++; } @@ -146,7 +146,7 @@ void OpenGLRenderer::useTexture(GLuint unit, GLuint tex) { glBindTexture(GL_TEXTURE_2D, tex); currentTextures[unit] = tex; textureCounter++; -#ifdef RW_PROFILER +#ifdef RW_GRAPHICS_STATS if (currentDebugDepth > 0) { profileInfo[currentDebugDepth - 1].textures++; } @@ -292,7 +292,7 @@ void OpenGLRenderer::setDrawState(const glm::mat4& model, DrawBuffer* draw, uploadUBO(UBOObject, objectData); drawCounter++; -#ifdef RW_PROFILER +#ifdef RW_GRAPHICS_STATS if (currentDebugDepth > 0) { profileInfo[currentDebugDepth - 1].draws++; profileInfo[currentDebugDepth - 1].primitives += p.count; @@ -423,7 +423,7 @@ void OpenGLRenderer::uploadUBOEntry(Buffer &buffer, const void *data, size_t siz } void OpenGLRenderer::pushDebugGroup(const std::string& title) { -#ifdef RW_PROFILER +#ifdef RW_GRAPHICS_STATS if (ogl_ext_KHR_debug) { glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, title.c_str()); ProfileInfo& prof = profileInfo[currentDebugDepth]; @@ -442,7 +442,7 @@ void OpenGLRenderer::pushDebugGroup(const std::string& title) { } const Renderer::ProfileInfo& OpenGLRenderer::popDebugGroup() { -#ifdef RW_PROFILER +#ifdef RW_GRAPHICS_STATS if (ogl_ext_KHR_debug) { glPopDebugGroup(); currentDebugDepth--;