GL: Fix two GLerror

The gizmo one was only reproducible in debug builds.
The GLImmediate one was only affecting amdpro drivers when --debug-gpu was
enabled.
This commit is contained in:
2020-09-01 00:22:44 +02:00
parent 7f95d780e8
commit 4e06afb0a1
2 changed files with 3 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ namespace blender::gpu {
GLImmediate::GLImmediate()
{
glGenVertexArrays(1, &vao_id_);
glBindVertexArray(vao_id_); /* Necessary for glObjectLabel. */
buffer.buffer_size = DEFAULT_INTERNAL_BUFFER_SIZE;
glGenBuffers(1, &buffer.vbo_id);
@@ -57,6 +58,7 @@ GLImmediate::GLImmediate()
glBufferData(GL_ARRAY_BUFFER, buffer_strict.buffer_size, NULL, GL_DYNAMIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
#ifndef __APPLE__
if ((G.debug & G_DEBUG_GPU) && (GLEW_VERSION_4_3 || GLEW_KHR_debug)) {