]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture3d.cpp
Remove remaining deprecated things from the core classes
[libs/gl.git] / source / core / texture3d.cpp
index 705a40ba5574cc950078d119e9061a90e6bd9272..984ffac7d4ef1a07985b3bf033915bbac3cf5b57 100644 (file)
@@ -1,5 +1,4 @@
 #include <cmath>
-#include <msp/core/raii.h>
 #include <msp/gl/extensions/arb_direct_state_access.h>
 #include <msp/gl/extensions/arb_texture_storage.h>
 #include <msp/gl/extensions/ext_texture3d.h>
@@ -103,18 +102,6 @@ void Texture3D::image(unsigned level, const void *data)
        glTexImage3D(target, level, fmt, size.x, size.y, size.z, 0, comp, type, data);
 
        allocated |= 1<<level;
-       if(auto_gen_mipmap && level==0)
-       {
-               generate_mipmap();
-               allocated |= (1<<levels)-1;
-       }
-}
-
-void Texture3D::image(unsigned level, PixelComponents comp, DataType type, const void *data)
-{
-       if(comp!=get_components(format) || type!=get_component_type(format))
-               throw incompatible_data("Texture3D::image");
-       image(level, data);
 }
 
 void Texture3D::sub_image(unsigned level, int x, int y, int z, unsigned wd, unsigned ht, unsigned dp, const void *data)
@@ -135,16 +122,6 @@ void Texture3D::sub_image(unsigned level, int x, int y, int z, unsigned wd, unsi
                bind_scratch();
                glTexSubImage3D(target, level, x, y, z, wd, ht, dp, comp, type, data);
        }
-
-       if(auto_gen_mipmap && level==0)
-               generate_mipmap();
-}
-
-void Texture3D::sub_image(unsigned level, int x, int y, int z, unsigned wd, unsigned ht, unsigned dp, PixelComponents comp, DataType type, const void *data)
-{
-       if(comp!=get_components(format) || type!=get_component_type(format))
-               throw incompatible_data("Texture3D::sub_image");
-       sub_image(level, x, y, z, wd, ht, dp, data);
 }
 
 void Texture3D::image(const Graphics::Image &img, unsigned lv)
@@ -191,7 +168,7 @@ LinAl::Vector<unsigned, 3> Texture3D::get_level_size(unsigned level) const
        return LinAl::Vector<unsigned, 3>(w, h, d);
 }
 
-UInt64 Texture3D::get_data_size() const
+uint64_t Texture3D::get_data_size() const
 {
        return id ? width*height*depth*get_pixel_size(storage_fmt) : 0;
 }