fix(renderer): make each unit has multiple texture bindings per target#215
Merged
fix(renderer): make each unit has multiple texture bindings per target#215
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the OpenGL texture binding management system to support multiple texture targets per texture unit instead of the previous single-binding approach. The changes introduce a new GLTextureUnitBinding class that can handle multiple texture types (2D, 2D array, 3D, cube map) simultaneously within each texture unit.
- Introduces
GLTextureUnitBindingclass to manage multiple texture bindings per unit - Updates texture recording logic to capture all texture types bound to each unit
- Reduces the number of recorded texture units from 32 to 17 for performance optimization
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/renderer/gles/context_storage.hpp | Adds new GLTextureUnitBinding class and updates storage data structures |
| src/renderer/gles/context_storage.cpp | Updates texture restoration logic to use new binding system |
| src/renderer/gles/context_host.cpp | Modifies texture recording to capture multiple bindings per unit and reduces unit count |
| src/renderer/gles/context_app.cpp | Updates texture binding change handler to work with new multi-binding system |
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 pull request refactors how texture bindings are managed in the OpenGL renderer codebase. The main change is introducing the new
GLTextureUnitBindingclass to handle multiple texture targets per texture unit, replacing the previous approach that stored only one binding per unit. This makes the texture binding logic more robust and extensible, and also updates the logic to only record up to 16 texture units for performance reasons.