]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texturecube.cpp
Decouple DataType from the OpenGL constants
[libs/gl.git] / source / core / texturecube.cpp
index 6ec3662523dea02903e024bb9113b91125e4b711..d006e383cc998af09fa478b18bb8bc4ce047ecfc 100644 (file)
@@ -109,7 +109,7 @@ void TextureCube::image(TextureCubeFace face, 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));
        glTexImage2D(face, level, storage_fmt, s, s, 0, comp, type, data);
 
        if(level==0)
@@ -151,7 +151,7 @@ void TextureCube::sub_image(TextureCubeFace face, unsigned level, int x, int y,
        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));
        glTexSubImage2D(face, level, x, y, wd, ht, comp, type, data);
 
        if(auto_gen_mipmap && level==0)