X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture.h;h=19da006937cf536aef73bc9ae43e0ba3bc3472b1;hp=7c29865747e79f6e7972bc329885303ea09fe52e;hb=HEAD;hpb=7adcad3b40a03000a82e32db4523761c218309b8 diff --git a/source/texture.h b/source/texture.h deleted file mode 100644 index 7c298657..00000000 --- a/source/texture.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef MSP_GL_TEXTURE_H_ -#define MSP_GL_TEXTURE_H_ - -#include -#include "types.h" - -namespace Msp { -namespace GL { - -enum TextureFilter -{ - NEAREST = GL_NEAREST, - LINEAR = GL_LINEAR, - NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST, - NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR, - LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST, - LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR -}; - -enum TextureFormat -{ - LUMINANCE8, - LUMINANCE8_ALPHA8, - RGB8, - RGBA8, - BGR8, - BGRA8 -}; - -class Texture -{ -public: - void bind() const; - void parameter(GLenum, int); - void parameter(GLenum, float); - void set_min_filter(TextureFilter f) { parameter(GL_TEXTURE_MIN_FILTER, f); } - void set_mag_filter(TextureFilter f) { parameter(GL_TEXTURE_MAG_FILTER, f); } - uint get_id() const { return id; } - sizei get_width(int =0) const; - sizei get_height(int =0) const; - sizei get_depth(int =0) const; - ~Texture(); -protected: - uint id; - GLenum target; - - Texture(); - - static const Texture *bound; -}; - -} // namespace GL -} // namespace Msp - -#endif