Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2005, 4:16:51 PM (18 years ago)
Author:
patrick
Message:

network: merged the trunk into the network with the command svn merge -r5824:HEAD ../trunk network, changes changed… bla bla..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/graphics/importer/texture.h

    r5768 r5968  
    1414struct SDL_Surface;
    1515
    16 //! an enumerator for different procedural texture-types
    17 typedef enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS,
    18   TEXTURE_NOISE };
    19 
    2016//! A Class, that reads in Textures from different fileformats.
    2117  class Texture : public BaseObject
     
    2723
    2824      bool loadImage(const char* imageName);
    29       bool rebuild();
     25      virtual bool rebuild();
    3026
    3127      /** @returns The textureID of this texture.  */
     
    3329      /** @returns true if texture has alpha, false otherwise */
    3430      inline bool hasAlpha() const {return bAlpha;}
     31      /** @returns the stored image of this Texture */
     32      const SDL_Surface* const getStoredImage() const { return this->image; };
     33
     34
     35
     36      static void setTextureEnableState(bool texturesEnabled);
     37      /** @returns true if Textures are enabled */
     38      inline static bool getTextureEnableState() { return Texture::texturesEnabled; };
     39
     40      // Utility functionality:
     41      static SDL_Surface* prepareSurface(SDL_Surface* input, bool& hasAlpha);
     42      static GLuint loadTexToGL (const SDL_Surface* surface);
    3543
    3644    protected:
    37       bool prepareSurface(SDL_Surface* input);
     45
    3846      bool setSurface(SDL_Surface* newSurface);
     47      bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; };
     48      bool setTexture(GLuint texture) { this->texture = texture; };
    3949
    40       GLuint loadTexToGL ();
    4150
    4251    private:
    43       GLuint        texture;            //!< The Texture-ID of opengl from this Texture.
    44       bool          bAlpha;             //!< if the texture has an alpha channel.
    45       SDL_Surface*  image;              //!< The SDL_Surfce that stores the Texture on it.
     52      GLuint           texture;            //!< The Texture-ID of opengl from this Texture.
     53      bool             bAlpha;             //!< if the texture has an alpha channel.
     54      SDL_Surface*     image;              //!< The SDL_Surfce that stores the Texture on it.
     55
     56      static bool      texturesEnabled;    //!< If the Textures are enabled.
    4657  };
    4758
Note: See TracChangeset for help on using the changeset viewer.