UGpuTexture: Add - #135
Merged
Merged
Conversation
This commit introduce a new `UGpuTexture` API to UniversalCraft. This API mimics Mojang's Blaze3D API, but works on all versions supported by UniversalCraft. Initially, only the most fundamental functionality is provided, together with a way to convert from/to the underlynig Minecraft type / OpenGL id. This is enough for us to start supporting Vulkan without having to lock in the API of all the more complex operations like copying between textures, updating only parts of a texture, and reading the pixel data back from gpu memory. Most of these will likely be migrated from Essential into this new API in the future as well, just not yet with this initial commit. This commit also adds a new `UGpuSampler` type, which allows one to configure texture filtering when using UC's `DrawCallBuilder`. This isn't directly related to the `UGpuTexture` API, but both changes modify the arguments of the same `DrawCallBuilder.texture` method, so I've combined.
Traben-0
self-requested a review
May 11, 2026 10:53
Traben-0
requested changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduce a new
UGpuTextureAPI to UniversalCraft.This API mimics Mojang's Blaze3D API, but works on all versions supported by UniversalCraft.
Initially, only the most fundamental functionality is provided, together with a way to convert from/to the underlynig Minecraft type / OpenGL id. This is enough for us to start supporting Vulkan without having to lock in the API of all the more complex operations like copying between textures, updating only parts of a texture, and reading the pixel data back from gpu memory.
Most of these will likely be migrated from Essential into this new API in the future as well, just not yet with this initial commit.
This commit also adds a new
UGpuSamplertype, which allows one to configure texture filtering when using UC'sDrawCallBuilder. This isn't directly related to theUGpuTextureAPI, but both changes modify the arguments of the sameDrawCallBuilder.texturemethod, so I've combined.