Skip to content

Fix p5.Image copy method to mark image as modified#8844

Closed
Chessing234 wants to merge 1 commit into
processing:mainfrom
Chessing234:fix/image-copy-modified
Closed

Fix p5.Image copy method to mark image as modified#8844
Chessing234 wants to merge 1 commit into
processing:mainfrom
Chessing234:fix/image-copy-modified

Conversation

@Chessing234
Copy link
Copy Markdown

Bug: Copying pixels into an image using the copy() method doesn't mark the image as modified. As a result, using it as a WEBGL texture immediately afterwards fails to upload the new pixels to the GPU.
Root cause: The copy() method delegates to p5.prototype.copy but fails to call this.setModified(true).
Why fix is correct: Adds a call to this.setModified(true) to properly track state changes, ensuring GPU textures are updated correctly.

@Chessing234 Chessing234 closed this by deleting the head repository May 29, 2026
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.

1 participant