fix(render3d): a rim from outline_model goes out when the caller stops asking
The queue was only emptied by the next outline_model call, so the last highlighted tree kept its rim after the player looked away. r3d_frame now calls outline_frame, which drops a batch the previous frame closed and nobody reopened. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
751532831a
commit
bfec11926f
3 changed files with 12 additions and 0 deletions
|
|
@ -230,6 +230,11 @@ function outline_model(m: Model, mat: words, width: int, r: int, g: int, b: int)
|
|||
ac_oq_n += 1
|
||||
}
|
||||
function outline_clear() -> void { ac_oq_n = 0; ac_oq_closed = true }
|
||||
# Called at the top of every frame. A batch the last frame closed and nobody has reopened
|
||||
# since is stale: the caller stopped asking. Without this it was drawn for ever - flush
|
||||
# closes a batch but only the NEXT outline_model call empties it, so looking away from a
|
||||
# highlighted tree left its rim on until something else was highlighted.
|
||||
function outline_frame() -> void { if ac_oq_closed { ac_oq_n = 0 } }
|
||||
|
||||
function actor_draw() -> void {
|
||||
if ac_actors == null { return }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue