Fix hair/curve drawing artifacts when workarounds are enabled.
Regression introduced by {rB601995c3b86986cf8f8e5b6e5a65bcfa7f8f2e32}. Noticed by Heist project as they render final frames with workarounds enabled. The mentioned patch introduces attaching VBO as textures. This used to be done by the caller. The mechanism used a different order hence the VBO could still be unbound when using. This cannot be solved inside the new mechanism clearly so this patch will just bind when the buffer isn't bound just before the drawing command is sent to the GPU driver.
This commit is contained in:
parent
3ff7d0796d
commit
5be3a68f58
|
@ -1051,6 +1051,10 @@ bool GLShader::transform_feedback_enable(GPUVertBuf *buf_)
|
|||
|
||||
GLVertBuf *buf = static_cast<GLVertBuf *>(unwrap(buf_));
|
||||
|
||||
if (buf->vbo_id_ == 0) {
|
||||
buf->bind();
|
||||
}
|
||||
|
||||
BLI_assert(buf->vbo_id_ != 0);
|
||||
|
||||
glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, buf->vbo_id_);
|
||||
|
|
Loading…
Reference in New Issue