Fix vertex selection error from recent refactor
Temporary fix for regression in 8084b7e6e2
.
This commit is contained in:
parent
89a7a1c156
commit
618f31312c
Notes:
blender-bot
2023-02-14 03:00:45 +01:00
Referenced by issue #79008, Selecting in Edit mode is broken if X-Ray is off.
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue