Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2007-12-27 00:46:30 +0300
committerKent Mein <mein@cs.umn.edu>2007-12-27 00:46:30 +0300
commitae976e087a7110c6b25a0fee4f663185b5e4319d (patch)
tree836c8b93de2b6f726ce5ea64914e3945cd60a4ae /source/blender/imbuf/intern/dds/Image.h
parent8e84f64c3daa5cd2cafc7fd14d7d0fad472298cf (diff)
This is patch: [#7975] imbuf for DDS textures: improved read support and a few bugs fixed
Kent Notes From the author: The attached patch syncs the DDS code in Blender with the latest revision (324) of the nvidia texture tools. This fixes a few minor issues and adds support for a more types of DDS textures, in particular uncompressed textures that don't have the standard 16, 24, or 32 bits per pixel. Note: I have started using the nvidia texture tools convention for naming integer types (uint, uint16, uint8, uint64 etc.) because doing so makes it much easier to merge patches from upstream. Since the code is compiled separately from the rest of Blender, this likely does not pose a problem. However, if there turns out to be a good reason for avoiding those nvidia type names from upstream, I'd be happy to fix it. Regards, Amorilia
Diffstat (limited to 'source/blender/imbuf/intern/dds/Image.h')
-rw-r--r--source/blender/imbuf/intern/dds/Image.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/imbuf/intern/dds/Image.h b/source/blender/imbuf/intern/dds/Image.h
index 10356774777..0241839d01d 100644
--- a/source/blender/imbuf/intern/dds/Image.h
+++ b/source/blender/imbuf/intern/dds/Image.h
@@ -37,6 +37,7 @@
#ifndef _DDS_IMAGE_H
#define _DDS_IMAGE_H
+#include <Common.h>
#include <Color.h>
/// 32 bit RGBA image.
@@ -53,28 +54,28 @@ public:
Image();
~Image();
- void allocate(unsigned int w, unsigned int h);
+ void allocate(uint w, uint h);
/*
bool load(const char * name);
- void wrap(void * data, unsigned int w, unsigned int h);
+ void wrap(void * data, uint w, uint h);
void unwrap();
*/
- unsigned int width() const;
- unsigned int height() const;
+ uint width() const;
+ uint height() const;
- const Color32 * scanline(unsigned int h) const;
- Color32 * scanline(unsigned int h);
+ const Color32 * scanline(uint h) const;
+ Color32 * scanline(uint h);
const Color32 * pixels() const;
Color32 * pixels();
- const Color32 & pixel(unsigned int idx) const;
- Color32 & pixel(unsigned int idx);
+ const Color32 & pixel(uint idx) const;
+ Color32 & pixel(uint idx);
- const Color32 & pixel(unsigned int x, unsigned int y) const;
- Color32 & pixel(unsigned int x, unsigned int y);
+ const Color32 & pixel(uint x, uint y) const;
+ Color32 & pixel(uint x, uint y);
Format format() const;
void setFormat(Format f);
@@ -83,19 +84,19 @@ private:
void free();
private:
- unsigned int m_width;
- unsigned int m_height;
+ uint m_width;
+ uint m_height;
Format m_format;
Color32 * m_data;
};
-inline const Color32 & Image::pixel(unsigned int x, unsigned int y) const
+inline const Color32 & Image::pixel(uint x, uint y) const
{
return pixel(y * width() + x);
}
-inline Color32 & Image::pixel(unsigned int x, unsigned int y)
+inline Color32 & Image::pixel(uint x, uint y)
{
return pixel(y * width() + x);
}