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

egui: Added reduce_texture_memory to Options #4431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

varphone
Copy link
Contributor

@varphone varphone commented Apr 28, 2024

Summary

This PR introduces a new configuration option reduce_texture_memory in egui.

Changes

  • Added reduce_texture_memory option in egui. When set to true, egui will discard the loaded image data after the texture is uploaded to the GPU, reducing memory usage. This is beneficial when handling a large number of images and retaining the image data is unnecessary, potentially saving substantial memory. However, this makes it impossible to serialize the loaded images or render on non-GPU systems. Default is false.

Impact

This new configuration option gives users more control over their memory usage, especially when dealing with a large number or large resolution of images. It allows users to optimize their applications based on their specific needs and constraints.

If `true`, `egui` will discard the loaded image data after
the texture is loaded onto the GPU to reduce memory usage.
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

The feature makes sense. I'm not 100% sold on the name, but don't have a better suggestion either 🤷

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.

None yet

2 participants