]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture1d.cpp
Decouple DataType from the OpenGL constants
[libs/gl.git] / source / core / texture1d.cpp
index 742857be725b4ed205b369c43d823f5b0812af14..1e90b6f7264d56d1f37c32afc9255157eca743b3 100644 (file)
@@ -75,7 +75,7 @@ void Texture1D::image(unsigned level, const void *data)
        }
 
        PixelComponents comp = get_components(storage_fmt);
-       DataType type = get_component_type(storage_fmt);
+       GLenum type = get_gl_type(get_component_type(storage_fmt));
        glTexImage1D(target, level, storage_fmt, w, 0, comp, type, data);
 
        allocated |= 1<<level;
@@ -102,7 +102,7 @@ void Texture1D::sub_image(unsigned level, int x, unsigned wd, const void *data)
        allocate(level);
 
        PixelComponents comp = get_components(storage_fmt);
-       DataType type = get_component_type(storage_fmt);
+       GLenum type = get_gl_type(get_component_type(storage_fmt));
        if(ARB_direct_state_access)
                glTextureSubImage1D(id, level, x, wd, comp, type, data);
        else