]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / texture.cpp
diff --git a/source/texture.cpp b/source/texture.cpp
deleted file mode 100644 (file)
index d12e18e..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "texture.h"
-
-namespace Msp {
-namespace GL {
-
-void Texture::bind() const
-{
-       if(!target) return;
-
-       glEnable(target);
-       glBindTexture(target, id);
-       bound=this;
-}
-
-void Texture::parameter(GLenum param, int value)
-{
-       if(bound!=this) bind();
-
-       glTexParameteri(target, param, value);
-}
-
-void Texture::parameter(GLenum param, float value)
-{
-       if(bound!=this) bind();
-
-       glTexParameterf(target, param, value);
-}
-
-sizei Texture::get_width(int level) const
-{
-       if(bound!=this) bind();
-
-       int width;
-       glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width);
-       return width;
-}
-
-sizei Texture::get_height(int level) const
-{
-       if(bound!=this) bind();
-
-       int height;
-       glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height);
-       return height;
-}
-
-sizei Texture::get_depth(int level) const
-{
-       if(bound!=this) bind();
-
-       int depth;
-       glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth);
-       return depth;
-}
-
-Texture::~Texture()
-{
-       glDeleteTextures(1, &id);
-}
-
-Texture::Texture():
-       target(0)
-{
-       glGenTextures(1, &id);
-}
-
-const Texture *Texture::bound=0;
-
-} // namespace GL
-} // namespace Msp