Skip to content

Fix Canvas Images going invisible#717

Merged
JamesVanBoxtel merged 2 commits into
panel-attack:betafrom
JamesVanBoxtel:renderCanvasBug
Nov 1, 2025
Merged

Fix Canvas Images going invisible#717
JamesVanBoxtel merged 2 commits into
panel-attack:betafrom
JamesVanBoxtel:renderCanvasBug

Conversation

@JamesVanBoxtel
Copy link
Copy Markdown
Contributor

We were rendering to canvases and then expecting them to stick around, but love documents canvas being cleared when the window size changes.

Instead we should render them to an image and just use the image instead.

Added helper methods that make sure to reset the graphics state when rendering

Also used the right DPI and filter.

Tested stage and character bundles

JamesVanBoxtel and others added 2 commits October 29, 2025 17:56
We were rendering to canvases and then expecting them to stick around,
but love documents canvas being cleared when the window size changes.

Instead we should render them to an image and just use the image instead.

Added helper methods that make sure to reset the graphics state when rendering

Also used the right DPI and filter.

Tested stage and character bundles
Copy link
Copy Markdown
Collaborator

@Endaris Endaris left a comment

Choose a reason for hiding this comment

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

Tested this a bit for love 12 and it is only a love 11.5 thing.
I renamed the function according to the return value love.Texture and removed the ImageData conversion for the love 12 path accordingly.

Copy link
Copy Markdown
Contributor Author

@JamesVanBoxtel JamesVanBoxtel left a comment

Choose a reason for hiding this comment

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

Looks good, tested on love 11 and 12

@JamesVanBoxtel JamesVanBoxtel merged commit 0dd4e6b into panel-attack:beta Nov 1, 2025
2 checks passed
@JamesVanBoxtel JamesVanBoxtel deleted the renderCanvasBug branch November 1, 2025 04:32
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.

2 participants