Skip to content

avm2: Refactor draw_triangles_internal#23761

Draft
SuchAFuriousDeath wants to merge 2 commits into
ruffle-rs:masterfrom
SuchAFuriousDeath:draw-triangles-refactor
Draft

avm2: Refactor draw_triangles_internal#23761
SuchAFuriousDeath wants to merge 2 commits into
ruffle-rs:masterfrom
SuchAFuriousDeath:draw-triangles-refactor

Conversation

@SuchAFuriousDeath
Copy link
Copy Markdown
Collaborator

@SuchAFuriousDeath SuchAFuriousDeath commented May 20, 2026

Description

This is a step towards rendering with uvt (which I'm trying to eventually implement) and this feels like a good time to submit this chunk as a separate PR before it gets too overwhelming. The behavioral changes should be minimal, the only added thing should be validation that indices come in triples (if not, an error is thrown, I adjusted the existing test adequately). I think the code is also much more readable now.

Testing

How can we test this PR?

Everything is already included in the adjusted test.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@torokati44 torokati44 added A-avm2 Area: AVM2 (ActionScript 3) T-refactor Type: Refactor / Cleanup labels May 20, 2026
@kjarosh
Copy link
Copy Markdown
Member

kjarosh commented May 20, 2026

Damn, I had some triangles refactor that was improving performance and fixing winding behavior, which will conflict with it :/

It's no big deal, but probably can help in implementing UVT.

@SuchAFuriousDeath SuchAFuriousDeath marked this pull request as draft May 21, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm2 Area: AVM2 (ActionScript 3) T-refactor Type: Refactor / Cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants