[Bf-blender-cvs] [618f31312c1] master: Fix vertex selection error from recent refactor
Campbell Barton
noreply at git.blender.org
Fri Jul 17 09:39:25 CEST 2020
Commit: 618f31312c1696472478bfa1612e66c1d2ab09a9
Author: Campbell Barton
Date: Fri Jul 17 17:35:46 2020 +1000
Branches: master
https://developer.blender.org/rB618f31312c1696472478bfa1612e66c1d2ab09a9
Fix vertex selection error from recent refactor
Temporary fix for regression in 8084b7e6e273e.
===================================================================
M source/blender/gpu/intern/gpu_framebuffer.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 366a1d17d69..40c1e6f59b2 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -683,6 +683,10 @@ static void gpu_framebuffer_read_color_ex(
{
GLenum type = gpu_get_gl_channel_type(channels);
GLenum gl_format = gpu_get_gl_datatype(format);
+ /* TODO: needed for selection buffers to work properly, this should be handled better. */
+ if (type == GL_RED && gl_format == GL_UNSIGNED_INT) {
+ type = GL_RED_INTEGER;
+ }
glReadBuffer(readfb);
glReadPixels(x, y, w, h, type, gl_format, data);
}
@@ -1075,4 +1079,4 @@ void GPU_frontbuffer_read_pixels(
{
glReadBuffer(GL_FRONT);
gpu_framebuffer_read_color_ex(x, y, w, h, channels, GL_FRONT, format, data);
-}
\ No newline at end of file
+}
More information about the Bf-blender-cvs
mailing list