X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftexture1d.cpp;h=39782efd8124d357e5bacdb88278309ea578d2b3;hb=HEAD;hp=a0876aced2d57f987d06f45660de8d8f9f456078;hpb=9dc2c20e8c7ac91d932b12492591b65786e24b0f;p=libs%2Fgl.git diff --git a/source/texture1d.cpp b/source/texture1d.cpp deleted file mode 100644 index a0876ace..00000000 --- a/source/texture1d.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include "bindable.h" -#include "error.h" -#include "texture1d.h" - -using namespace std; - -namespace Msp { -namespace GL { - -Texture1D::Texture1D(): - Texture(GL_TEXTURE_1D), - ifmt(RGB), - width(0), - allocated(0) -{ - static Require _req(MSP_texture1D); -} - -void Texture1D::storage(PixelFormat fmt, unsigned wd) -{ - if(width>0) - throw invalid_operation("Texture1D::storage"); - if(wd==0) - throw invalid_argument("Texture1D::storage"); - require_pixelformat(fmt); - - ifmt = fmt; - width = wd; -} - -void Texture1D::allocate(unsigned level) -{ - if(allocated&(1<>=1, ++level) ; - allocated |= (1<>level; -} - -UInt64 Texture1D::get_data_size() const -{ - return id ? width*get_pixel_size(ifmt) : 0; -} - -} // namespace GL -} // namespace Msp