Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2006, 4:42:35 PM (18 years ago)
Author:
bensch
Message:

Textures are way improved now

File:
1 edited

Legend:

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

    r7221 r7522  
    1919    public:
    2020      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);
    2222      virtual ~Texture();
    2323
    2424      bool loadImage(const std::string& imageName, GLenum target = GL_TEXTURE_2D);
     25      bool loadSurface(SDL_Surface* surface, GLenum target = GL_TEXTURE_2D);
    2526      virtual bool rebuild();
    2627
     
    2829      inline GLuint getTexture() const { return this->texture; };
    2930      /** @returns true if texture has alpha, false otherwise */
    30       inline bool hasAlpha() const {return bAlpha;}
     31      inline bool hasAlpha() const  {return bAlpha; }
    3132      /** @returns the stored image of this Texture */
    3233      const SDL_Surface* const getStoredImage() const { return this->image; };
     
    4344
    4445    protected:
    45 
    4646      bool setSurface(SDL_Surface* newSurface);
    4747      bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; };
    4848      bool setTexture(GLuint texture) { this->texture = texture; };
    4949
     50    private:
     51      void init();
    5052
    5153    private:
Note: See TracChangeset for help on using the changeset viewer.