Page MenuHome

Fix line width broken for consecutive line draw calls
ClosedPublic

Authored by Julian Eisel (Severin) on Feb 24 2021, 12:35 AM.

Details

Summary

D9054 did multiple consecutive immBegin()/immEnd() draw calls to draw
multiple lines at varying thickness. This would only work for the first line,
then they'd all get a 1px thickness (at least on macOS).

Issue was that wide_line_workaround_end() called immBindShader() directly
to restore the old shader (which the workaround overrides). However this
doesn't set imm->builtin_shader_bound which has to be done for the workaround
to work on the next immBegin() call. Instead immBindBuiltinProgram() can be
called.

Diff Detail

Repository
rB Blender
Branch
temp-wide-line-fix (branched from master)
Build Status
Buildable 13086
Build 13086: arc lint + arc unit