Project

General

Profile

« Previous | Next » 

Revision f08458cd

Added by danij over 13 years ago

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.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences