Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Texture upload refactoring continues:
* Store the used/assumed color palette index for the loaded image data in de::Image making it possible to determine the difference between a luminance texture and a non-masked paletted texture without forcing the user to track this information. This removes a nasty logical disconnect between the namespace from which an image is loaded and whether or not it is paletted in de::Textures::prepareVariant. * Do not allocate double the required storage space for luminance textures with TXCF_CONVERT_8BIT_TO_ALPHA when taking a texture content copy. We do not do any in-place conversions once the upload task has been deferred (the only caller) so this is just unused space. Although we should do in-place conversions during content upload, that is not the current logic. * Added conversion from color-paletted to alpha-map. Not exactly optimum but considering we'll probably never use it, it doesn't really matter. I merely needed to eliminate a logic branch/use case. * Moved the "noStretch" and "toAlpha" properties into de::TextureVariantSpecification. * Fixed lightmap clamping. * Cleanup. The only remaining unwanted uses of the variant usage contexts in de::Textures::prepareVariant are for the min/mag filter selections. Once this is addressed (and creation of the image analyses moved out), the context compare in GL_CompareTextureVariantSpecifications can be removed, further improving GL texture object sharing.
- Loading branch information
1 parent
80b7f13
commit f08458c
Showing
28 changed files
with
200 additions
and
185 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.