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:
authorCampbell Barton <ideasman42@gmail.com>2020-07-17 10:35:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-07-17 10:37:35 +0300
commit618f31312c1696472478bfa1612e66c1d2ab09a9 (patch)
tree4d809685b7f200be9d9c5852c598cd4e0a4fa8cd /source/blender
parent89a7a1c156f01e4c2af11c06caa9330c439810e1 (diff)
Fix vertex selection error from recent refactor
Temporary fix for regression in 8084b7e6e273e.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c6
1 files changed, 5 insertions, 1 deletions
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
+}