diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8/source/Irrlicht/CSoftwareTexture2.h | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CSoftwareTexture2.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CSoftwareTexture2.h | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CSoftwareTexture2.h b/libraries/irrlicht-1.8/source/Irrlicht/CSoftwareTexture2.h deleted file mode 100644 index d11b552..0000000 --- a/libraries/irrlicht-1.8/source/Irrlicht/CSoftwareTexture2.h +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __C_SOFTWARE_2_TEXTURE_H_INCLUDED__ | ||
6 | #define __C_SOFTWARE_2_TEXTURE_H_INCLUDED__ | ||
7 | |||
8 | #include "SoftwareDriver2_compile_config.h" | ||
9 | |||
10 | #include "ITexture.h" | ||
11 | #include "CImage.h" | ||
12 | |||
13 | namespace irr | ||
14 | { | ||
15 | namespace video | ||
16 | { | ||
17 | |||
18 | /*! | ||
19 | interface for a Video Driver dependent Texture. | ||
20 | */ | ||
21 | class CSoftwareTexture2 : public ITexture | ||
22 | { | ||
23 | public: | ||
24 | |||
25 | //! constructor | ||
26 | enum eTex2Flags | ||
27 | { | ||
28 | GEN_MIPMAP = 1, | ||
29 | IS_RENDERTARGET = 2, | ||
30 | NP2_SIZE = 4, | ||
31 | HAS_ALPHA = 8 | ||
32 | }; | ||
33 | CSoftwareTexture2(IImage* surface, const io::path& name, u32 flags, void* mipmapData=0); | ||
34 | |||
35 | //! destructor | ||
36 | virtual ~CSoftwareTexture2(); | ||
37 | |||
38 | //! lock function | ||
39 | virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) | ||
40 | { | ||
41 | if (Flags & GEN_MIPMAP) | ||
42 | MipMapLOD=mipmapLevel; | ||
43 | return MipMap[MipMapLOD]->lock(); | ||
44 | } | ||
45 | |||
46 | //! unlock function | ||
47 | virtual void unlock() | ||
48 | { | ||
49 | MipMap[MipMapLOD]->unlock(); | ||
50 | } | ||
51 | |||
52 | //! Returns original size of the texture. | ||
53 | virtual const core::dimension2d<u32>& getOriginalSize() const | ||
54 | { | ||
55 | //return MipMap[0]->getDimension(); | ||
56 | return OrigSize; | ||
57 | } | ||
58 | |||
59 | //! Returns the size of the largest mipmap. | ||
60 | f32 getLODFactor( const f32 texArea ) const | ||
61 | { | ||
62 | return OrigImageDataSizeInPixels * texArea; | ||
63 | //return MipMap[0]->getImageDataSizeInPixels () * texArea; | ||
64 | } | ||
65 | |||
66 | //! Returns (=size) of the texture. | ||
67 | virtual const core::dimension2d<u32>& getSize() const | ||
68 | { | ||
69 | return MipMap[MipMapLOD]->getDimension(); | ||
70 | } | ||
71 | |||
72 | //! returns unoptimized surface | ||
73 | virtual CImage* getImage() const | ||
74 | { | ||
75 | return MipMap[0]; | ||
76 | } | ||
77 | |||
78 | //! returns texture surface | ||
79 | virtual CImage* getTexture() const | ||
80 | { | ||
81 | return MipMap[MipMapLOD]; | ||
82 | } | ||
83 | |||
84 | |||
85 | //! returns driver type of texture (=the driver, who created the texture) | ||
86 | virtual E_DRIVER_TYPE getDriverType() const | ||
87 | { | ||
88 | return EDT_BURNINGSVIDEO; | ||
89 | } | ||
90 | |||
91 | //! returns color format of texture | ||
92 | virtual ECOLOR_FORMAT getColorFormat() const | ||
93 | { | ||
94 | return BURNINGSHADER_COLOR_FORMAT; | ||
95 | } | ||
96 | |||
97 | //! returns pitch of texture (in bytes) | ||
98 | virtual u32 getPitch() const | ||
99 | { | ||
100 | return MipMap[MipMapLOD]->getPitch(); | ||
101 | } | ||
102 | |||
103 | //! Regenerates the mip map levels of the texture. Useful after locking and | ||
104 | //! modifying the texture | ||
105 | virtual void regenerateMipMapLevels(void* mipmapData=0); | ||
106 | |||
107 | //! support mipmaps | ||
108 | virtual bool hasMipMaps() const | ||
109 | { | ||
110 | return (Flags & GEN_MIPMAP ) != 0; | ||
111 | } | ||
112 | |||
113 | //! Returns if the texture has an alpha channel | ||
114 | virtual bool hasAlpha() const | ||
115 | { | ||
116 | return (Flags & HAS_ALPHA ) != 0; | ||
117 | } | ||
118 | |||
119 | //! is a render target | ||
120 | virtual bool isRenderTarget() const | ||
121 | { | ||
122 | return (Flags & IS_RENDERTARGET) != 0; | ||
123 | } | ||
124 | |||
125 | private: | ||
126 | f32 OrigImageDataSizeInPixels; | ||
127 | core::dimension2d<u32> OrigSize; | ||
128 | |||
129 | CImage * MipMap[SOFTWARE_DRIVER_2_MIPMAPPING_MAX]; | ||
130 | |||
131 | u32 MipMapLOD; | ||
132 | u32 Flags; | ||
133 | ECOLOR_FORMAT OriginalFormat; | ||
134 | }; | ||
135 | |||
136 | |||
137 | } // end namespace video | ||
138 | } // end namespace irr | ||
139 | |||
140 | #endif | ||
141 | |||