Changeset 10460 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Jan 28, 2007, 9:26:08 PM (18 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/texture.h
r9882 r10460 55 55 static GLuint loadTexToGL (const SDL_Surface* surface, GLenum target = GL_TEXTURE_2D); 56 56 57 float getHeight() { return this->data->getHeight(); } 58 float getWidth() { return this->data->getWidth(); } 59 57 60 protected: 58 61 bool setSurface(SDL_Surface* newSurface) { return this->data->setSurface(newSurface); }; -
trunk/src/lib/graphics/importer/texture_data.cc
r8363 r10460 21 21 #include "compiler.h" 22 22 23 #include "sdlincl.h"24 23 25 24 /** … … 31 30 this->texture = 0; 32 31 this->image = NULL; 32 this->height = 0.; 33 this->width = 0.; 33 34 } 34 35 … … 56 57 bool TextureData::loadSurface(SDL_Surface* surface, GLenum target) 57 58 { 59 if( surface != NULL) 60 { 61 this->height = surface->h; 62 this->width = surface->w; 63 } 64 58 65 if (Texture::getTextureEnableState()) 59 66 { -
trunk/src/lib/graphics/importer/texture_data.h
r9869 r10460 11 11 #include "glincl.h" 12 12 #include "count_pointer.h" 13 #include "sdlincl.h" 14 13 15 14 16 /* Forward Declaration */ … … 38 40 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; return this->bAlpha; }; 39 41 bool setTexture(GLuint texture); 42 float getHeight() { return this->height;} 43 float getWidth() { return this->width; } 40 44 41 45 private: 46 float height; //!< height of tex 47 float width; //!< width of tex 42 48 GLuint texture; //!< The Texture-ID of opengl from this Texture. 43 49 bool bAlpha; //!< if the texture has an alpha channel.
Note: See TracChangeset
for help on using the changeset viewer.