Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-31 23:41:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-01 01:30:36 +0300
commit82a197cc7f74be2e8f4fbe2d40fc2aec100c4276 (patch)
treeae24bb864c9e5570779979d21f1411efa3458947 /source/blender/gpu/opengl/gl_context.cc
parent058d29ed9a3e971049c0d9d99f1cf571bfb0efae (diff)
GPUDebug: Reformat GL debug callbacks and move them to GL backend
Now the callbacks are setup for each debug context. The formating has been reworked to be less verbose and make errors and warnings stand out from the notifications. Errors are most of the time sufficiently explicit in their message. This also remove the support for AMD_debug_output which is 10 years old. This is related to the Vulkan port T68990.
Diffstat (limited to 'source/blender/gpu/opengl/gl_context.cc')
-rw-r--r--source/blender/gpu/opengl/gl_context.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index e89eeca1c8a..7d564004a01 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -25,12 +25,15 @@
#include "BLI_system.h"
#include "BLI_utildefines.h"
+#include "BKE_global.h"
+
#include "GPU_framebuffer.h"
#include "GHOST_C-api.h"
#include "gpu_context_private.hh"
+#include "gl_debug.hh"
#include "gl_immediate.hh"
#include "gl_state.hh"
@@ -47,6 +50,10 @@ using namespace blender::gpu;
GLContext::GLContext(void *ghost_window, GLSharedOrphanLists &shared_orphan_list)
: shared_orphan_list_(shared_orphan_list)
{
+ if (G.debug & G_DEBUG_GPU) {
+ debug::init_gl_callbacks();
+ }
+
float data[4] = {0.0f, 0.0f, 0.0f, 1.0f};
glGenBuffers(1, &default_attr_vbo_);
glBindBuffer(GL_ARRAY_BUFFER, default_attr_vbo_);