Changeset 7687 in orxonox.OLD for branches/water/src/lib/graphics/importer/texture.h
- Timestamp:
- May 18, 2006, 3:16:46 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/lib/graphics/importer/texture.h
r7221 r7687 19 19 public: 20 20 Texture(const std::string& imageName = "", GLenum target = GL_TEXTURE_2D); 21 // Texture(TEXTURE_TYPE type, int resolution);21 Texture(SDL_Surface* surface, GLenum target = GL_TEXTURE_2D); 22 22 virtual ~Texture(); 23 23 24 24 bool loadImage(const std::string& imageName, GLenum target = GL_TEXTURE_2D); 25 bool loadSurface(SDL_Surface* surface, GLenum target = GL_TEXTURE_2D); 25 26 virtual bool rebuild(); 26 27 … … 28 29 inline GLuint getTexture() const { return this->texture; }; 29 30 /** @returns true if texture has alpha, false otherwise */ 30 inline bool hasAlpha() const {return bAlpha;}31 inline bool hasAlpha() const {return bAlpha; } 31 32 /** @returns the stored image of this Texture */ 32 33 const SDL_Surface* const getStoredImage() const { return this->image; }; … … 43 44 44 45 protected: 45 46 46 bool setSurface(SDL_Surface* newSurface); 47 47 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; }; 48 48 bool setTexture(GLuint texture) { this->texture = texture; }; 49 49 50 private: 51 void init(); 50 52 51 53 private:
Note: See TracChangeset
for help on using the changeset viewer.