goat3dgfx

diff src/texture.h @ 33:253542d715f4

default texture
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Mar 2014 06:32:37 +0200
parents dc5918c62a64
children
line diff
     1.1 --- a/src/texture.h	Sun Mar 02 04:20:00 2014 +0200
     1.2 +++ b/src/texture.h	Sun Mar 02 06:32:37 2014 +0200
     1.3 @@ -17,6 +17,7 @@
     1.4  	unsigned int texfmt;
     1.5  	int sz[3];
     1.6  	Image *img;
     1.7 +	static Image *default_img;
     1.8  
     1.9  	Texture(const Texture &tex) {}
    1.10  	Texture &operator =(const Texture &tex) { return *this; }
    1.11 @@ -44,6 +45,7 @@
    1.12  	int get_size(int dim) const;
    1.13  
    1.14  	void create(int xsz, int ysz, TextureType type = TEX_2D, unsigned int ifmt = GL_RGBA);
    1.15 +	void create_default(TextureType type = TEX_2D);
    1.16  	void set_image(const Image &img, int idx = -1);
    1.17  
    1.18  	bool load(const char *fname);
    1.19 @@ -67,6 +69,8 @@
    1.20  
    1.21  public:
    1.22  	TextureSet();
    1.23 +
    1.24 +	Texture *get_texture(const char *name, TextureType type = TEX_2D) const;
    1.25  };
    1.26  
    1.27  }	// namespace goatgfx