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

RenderCore_Minimal: use glSubTexImage2d over glTexImage2d #24

Merged
merged 1 commit into from May 26, 2022

Conversation

HugoPeters1024
Copy link
Contributor

This prevents a new allocation of texture memory and as a result is likely faster.

Extra info:
https://www.khronos.org/opengl/wiki/Common_Mistakes#Updating_a_texture

glTexImage2D creates the storage for the texture, defining the size/format and removing all previous pixel data. glTexSubImage2D only modifies pixel data within the texture. It can be used to update all the texels, or simply a portion of them.

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