diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-11 23:05:20 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-11 23:12:13 +0200 |
commit | cec406ea31c3ccb22ab676ce3fd52d4cd0dfcb0d (patch) | |
tree | 61c5c3a101e2ae5a1b4c0fe352d290462675aac5 /src/graphics/core | |
parent | dcf4c8941f3d0d287f0068ef64949890edeefa95 (diff) | |
download | colobot-cec406ea31c3ccb22ab676ce3fd52d4cd0dfcb0d.tar.gz colobot-cec406ea31c3ccb22ab676ce3fd52d4cd0dfcb0d.tar.bz2 colobot-cec406ea31c3ccb22ab676ce3fd52d4cd0dfcb0d.zip |
Non-power-of-2 padding for background images
* added padding options
* removed old hardcoded image sizes
Diffstat (limited to 'src/graphics/core')
-rw-r--r-- | src/graphics/core/texture.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/graphics/core/texture.h b/src/graphics/core/texture.h index 49b29f8..31e3774 100644 --- a/src/graphics/core/texture.h +++ b/src/graphics/core/texture.h @@ -136,6 +136,8 @@ struct TextureCreateParams TexMinFilter minFilter; //! Magnification filter TexMagFilter magFilter; + //! Pad the image to nearest power of 2 dimensions + bool padToNearestPowerOfTwo; //! Constructor; calls LoadDefault() TextureCreateParams() @@ -146,6 +148,7 @@ struct TextureCreateParams { format = TEX_IMG_RGB; mipmap = false; + padToNearestPowerOfTwo = false; minFilter = TEX_MIN_FILTER_NEAREST; magFilter = TEX_MAG_FILTER_NEAREST; @@ -212,6 +215,8 @@ struct Texture unsigned int id; //! Size of texture Math::IntPoint size; + //! Original size of texture (as loaded from image) + Math::IntPoint originalSize; //! Whether the texture has alpha channel bool alpha; |