Skip to content

Conversation

@richTrash21
Copy link
Contributor

@richTrash21 richTrash21 commented Oct 7, 2025

Fixes #3169
Fixes #2263

The problem was with use of colors vector for storing color transformations. As can be seen here it was a part of Graphics API in legacy versions of OpenFL and was eventually replaced by shader in #2671. Now addQuad stores color transformations in colorMultipliers and colorOffsets.

@richTrash21 richTrash21 changed the title Fix FLX_RENDER_TRIANGLE Fix FLX_RENDER_TRIANGLE not rendering anything Oct 7, 2025
@richTrash21 richTrash21 marked this pull request as ready for review October 10, 2025 15:31
@Geokureli Geokureli added this to the Next Patch milestone Oct 10, 2025
Copy link
Member

@Geokureli Geokureli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of unrelated changes, here. Please remember to list and justify every change in the description.

Comment on lines -353 to -356
colors[prevColorsPos] = color;
colors[prevColorsPos + 1] = color;
colors[prevColorsPos + 2] = color;
colors[prevColorsPos + 3] = color;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we deprecate colors?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice colors is still used in addTriangles should that be changed as well? why does that seem to work but not this?

Copy link
Contributor Author

@richTrash21 richTrash21 Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we deprecate colors?

Yes, but only in triangle draw item. I think colors as a feature is really nice and should stay, but with different implementation. This would also fix #2263.

I notice colors is still used in addTriangles should that be changed as well? why does that seem to work but not this?

FYI, this is explained this in the description. This was also originally adressed in #3472, where colors were multiplied to transform. I was planning to make this as a sepparate pr, but it might be better to add this change here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think colors as a feature is really nice and should stay, but with different implementation.

Care to make an issue detailing the ideal implementation of colors?

@Geokureli
Copy link
Member

Geokureli commented Oct 12, 2025

@richTrash21 Can you allow me to push commits to this branch?

@richTrash21
Copy link
Contributor Author

richTrash21 commented Oct 14, 2025

@richTrash21 Can you allow me to push commits to this branch?

Sadly i can't. This branch is under our organization's fork and GitHub does not allow maintainers to commit changes in such cases. I did not know that beforehand. The reason why i created the branch this way is because the issues and solutions were initially discovered and fixed on another branch of this fork.

This means that any changes to this branch have to come from me (or organization) and i'm currently working on them. If it would be more beneficial, i can also move this branch to my fork and open new pr where changes from maintainers will be allowed.

@Geokureli
Copy link
Member

@richTrash21 Can you allow me to push commits to this branch?

Sadly i can't.

TwistTeam#1

@Geokureli Geokureli merged commit 78d4e25 into HaxeFlixel:dev Oct 14, 2025
10 checks passed
@Geokureli
Copy link
Member

Thanks!

@richTrash21 richTrash21 deleted the bugfix/render-triangle-fix branch October 16, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DrawTriangle's rendering broken, not rendering colors don't work in FlxStrip

2 participants