mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
Move opengl debuging from RW_PROFILER, it interferes with CPU timing.
This commit is contained in:
parent
1efe3840b8
commit
14885c24dc
@ -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--;
|
||||
|
Loading…
Reference in New Issue
Block a user