Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid full-rendering sprites a second time in the mouse map #2189

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

wixoaGit
Copy link
Member

@wixoaGit wixoaGit commented Jan 28, 2025

Mouse map rendering was using GetTexture() which will do a full re-render of a sprite if it's more complicated. We already keep a reference to the texture drawn in the current frame, so use that instead.

This also allows less calls to UseShader() since GetTexture was sometimes changing the shader.

@boring-cyborg boring-cyborg bot added the Client Involves the OpenDream client label Jan 28, 2025
@wixoaGit wixoaGit merged commit 8434b8e into OpenDreamProject:master Jan 28, 2025
7 checks passed
@wixoaGit wixoaGit deleted the optimize_mousemap branch January 28, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Involves the OpenDream client size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant