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());
|
glBindVertexArray(dbuff->getVAOName());
|
||||||
currentDbuff = dbuff;
|
currentDbuff = dbuff;
|
||||||
bufferCounter++;
|
bufferCounter++;
|
||||||
#ifdef RW_PROFILER
|
#ifdef RW_GRAPHICS_STATS
|
||||||
if (currentDebugDepth > 0) {
|
if (currentDebugDepth > 0) {
|
||||||
profileInfo[currentDebugDepth - 1].buffers++;
|
profileInfo[currentDebugDepth - 1].buffers++;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ void OpenGLRenderer::useTexture(GLuint unit, GLuint tex) {
|
|||||||
glBindTexture(GL_TEXTURE_2D, tex);
|
glBindTexture(GL_TEXTURE_2D, tex);
|
||||||
currentTextures[unit] = tex;
|
currentTextures[unit] = tex;
|
||||||
textureCounter++;
|
textureCounter++;
|
||||||
#ifdef RW_PROFILER
|
#ifdef RW_GRAPHICS_STATS
|
||||||
if (currentDebugDepth > 0) {
|
if (currentDebugDepth > 0) {
|
||||||
profileInfo[currentDebugDepth - 1].textures++;
|
profileInfo[currentDebugDepth - 1].textures++;
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@ void OpenGLRenderer::setDrawState(const glm::mat4& model, DrawBuffer* draw,
|
|||||||
uploadUBO(UBOObject, objectData);
|
uploadUBO(UBOObject, objectData);
|
||||||
|
|
||||||
drawCounter++;
|
drawCounter++;
|
||||||
#ifdef RW_PROFILER
|
#ifdef RW_GRAPHICS_STATS
|
||||||
if (currentDebugDepth > 0) {
|
if (currentDebugDepth > 0) {
|
||||||
profileInfo[currentDebugDepth - 1].draws++;
|
profileInfo[currentDebugDepth - 1].draws++;
|
||||||
profileInfo[currentDebugDepth - 1].primitives += p.count;
|
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) {
|
void OpenGLRenderer::pushDebugGroup(const std::string& title) {
|
||||||
#ifdef RW_PROFILER
|
#ifdef RW_GRAPHICS_STATS
|
||||||
if (ogl_ext_KHR_debug) {
|
if (ogl_ext_KHR_debug) {
|
||||||
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, title.c_str());
|
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, title.c_str());
|
||||||
ProfileInfo& prof = profileInfo[currentDebugDepth];
|
ProfileInfo& prof = profileInfo[currentDebugDepth];
|
||||||
@ -442,7 +442,7 @@ void OpenGLRenderer::pushDebugGroup(const std::string& title) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Renderer::ProfileInfo& OpenGLRenderer::popDebugGroup() {
|
const Renderer::ProfileInfo& OpenGLRenderer::popDebugGroup() {
|
||||||
#ifdef RW_PROFILER
|
#ifdef RW_GRAPHICS_STATS
|
||||||
if (ogl_ext_KHR_debug) {
|
if (ogl_ext_KHR_debug) {
|
||||||
glPopDebugGroup();
|
glPopDebugGroup();
|
||||||
currentDebugDepth--;
|
currentDebugDepth--;
|
||||||
|
Loading…
Reference in New Issue
Block a user