20
20
namespace tImage
21
21
{
22
22
class tPicture ;
23
+ class tLayer ;
24
+
25
+
26
+ // These are hany for all image types that may contain cubemaps.
27
+ enum tFaceIndex : uint32
28
+ {
29
+ tFaceIndex_Default,
30
+ tFaceIndex_PosX = tFaceIndex_Default,
31
+ tFaceIndex_NegX,
32
+ tFaceIndex_PosY,
33
+ tFaceIndex_NegY,
34
+ tFaceIndex_PosZ,
35
+ tFaceIndex_NegZ,
36
+ tFaceIndex_NumFaces
37
+ };
38
+
39
+ // Faces are always specified using a left-handed coord system even when using the OpenGL functions.
40
+ enum tFaceFlag : uint32
41
+ {
42
+ tFaceFlag_PosX = 1 << tFaceIndex_PosX,
43
+ tFaceFlag_NegX = 1 << tFaceIndex_NegX,
44
+ tFaceFlag_PosY = 1 << tFaceIndex_PosY,
45
+ tFaceFlag_NegY = 1 << tFaceIndex_NegY,
46
+ tFaceFlag_PosZ = 1 << tFaceIndex_PosZ,
47
+ tFaceFlag_NegZ = 1 << tFaceIndex_NegZ,
48
+ tFaceFlag_All = 0xFFFFFFFF
49
+ };
23
50
24
51
25
52
// Abstract base class for all tImage types. At a minumum all tImageEXTs need to be able to be set from a single tFrame
@@ -83,23 +110,16 @@ class tBaseImage
83
110
virtual tAlphaMode GetAlphaMode () const { return tAlphaMode::Unspecified; }
84
111
virtual tChannelType GetChannelType () const { return tChannelType::Unspecified; }
85
112
86
- // @wip
87
- #if 0
88
113
// Not all derived classes need to support these next four functions.
89
- virtual bool IsMipmapped() const;
90
- virtual bool IsCubemap() const;
91
-
92
- // Gets the layers but you're not allowed to delete them, they're not yours. Make sure the list you supply doesn't
93
- // delete them when it's destructed. Returns the number of items appended to the list.
94
- virtual int GetLayers(tList<tLayer>&) const;
114
+ virtual bool IsMipmapped () const { return false ; }
115
+ virtual bool IsCubemap () const { return false ; }
95
116
96
117
// Gets the layers but you're not allowed to delete them, they're not yours. Make sure the list you supply doesn't
97
118
// delete them when it's destructed. Returns the number of items appended to the list.
98
- virtual int GetCubemapLayers (tList<tLayer> layers[tFaceIndex_NumFaces], uint32 faceFlags = tFaceFlag_All ) const;
99
- # endif
119
+ virtual int GetLayers (tList<tLayer>& ) const { return 0 ; }
120
+ virtual int GetCubemapLayers (tList<tLayer> layers[tFaceIndex_NumFaces], uint32 faceFlags = tFaceFlag_All) const { return 0 ; }
100
121
101
122
protected:
102
-
103
123
// Pretty sure all tImageXXX classes will find these useful.
104
124
tPixelFormat PixelFormatSrc = tPixelFormat::Unspecified;
105
125
tPixelFormat PixelFormat = tPixelFormat::Unspecified;
@@ -108,30 +128,4 @@ class tBaseImage
108
128
};
109
129
110
130
111
- // These are hany for all image types that may contain cubemaps.
112
- enum tFaceIndex : uint32
113
- {
114
- tFaceIndex_Default,
115
- tFaceIndex_PosX = tFaceIndex_Default,
116
- tFaceIndex_NegX,
117
- tFaceIndex_PosY,
118
- tFaceIndex_NegY,
119
- tFaceIndex_PosZ,
120
- tFaceIndex_NegZ,
121
- tFaceIndex_NumFaces
122
- };
123
-
124
- // Faces are always specified using a left-handed coord system even when using the OpenGL functions.
125
- enum tFaceFlag : uint32
126
- {
127
- tFaceFlag_PosX = 1 << tFaceIndex_PosX,
128
- tFaceFlag_NegX = 1 << tFaceIndex_NegX,
129
- tFaceFlag_PosY = 1 << tFaceIndex_PosY,
130
- tFaceFlag_NegY = 1 << tFaceIndex_NegY,
131
- tFaceFlag_PosZ = 1 << tFaceIndex_PosZ,
132
- tFaceFlag_NegZ = 1 << tFaceIndex_NegZ,
133
- tFaceFlag_All = 0xFFFFFFFF
134
- };
135
-
136
-
137
131
}
0 commit comments