MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / CTexture

Class CTexture

physx/samples/sampleframework/framework/src/nv_dds.h:184–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 };
183
184 class CTexture : public CSurface
185 {
186 friend class CDDSImage;
187
188 public:
189 CTexture();
190 CTexture(unsigned int w, unsigned int h, unsigned int d, unsigned int imgsize, const unsigned char *pixels);
191 CTexture(const CTexture &copy);
192 CTexture &operator= (const CTexture &rhs);
193 ~CTexture();
194
195 void create(unsigned int w, unsigned int h, unsigned int d, unsigned int imgsize, const unsigned char *pixels);
196 void clear();
197
198 inline const CSurface &get_mipmap(unsigned int index) const
199 {
200 assert(!m_mipmaps.empty());
201 assert(index < m_mipmaps.size());
202
203 return m_mipmaps[index];
204 }
205
206 inline void add_mipmap(const CSurface &mipmap)
207 {
208 m_mipmaps.push_back(mipmap);
209 }
210
211 inline unsigned int get_num_mipmaps() const { return (unsigned int)m_mipmaps.size(); }
212
213 protected:
214 inline CSurface &get_mipmap(unsigned int index)
215 {
216 assert(!m_mipmaps.empty());
217 assert(index < m_mipmaps.size());
218
219 return m_mipmaps[index];
220 }
221
222 private:
223 std::deque<CSurface> m_mipmaps;
224 };
225
226 class CDDSImage
227 {

Callers 1

loadMethod · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected