]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.cpp
Completely hide OpenGL from the public headers
[libs/gl.git] / source / core / texture.cpp
index bbda89b622f78b51038b8e8fd6123274d24a4e14..ef8b7eef48584db1b9680338cf67b9df1d31f452 100644 (file)
@@ -13,7 +13,7 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-int Texture::swizzle_orders[] =
+const int Texture::swizzle_orders[] =
 {
        GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA,
        GL_RED, GL_RED, GL_RED, GL_ONE,
@@ -26,8 +26,8 @@ Texture *Texture::scratch_binding = 0;
 Texture::Texture(GLenum t, ResourceManager *m):
        id(0),
        target(t),
-       format(RGB8),
-       storage_fmt(RGB8),
+       format(NO_PIXELFORMAT),
+       storage_fmt(format),
        swizzle(NO_SWIZZLE),
        use_srgb_format(false),
        auto_gen_mipmap(false)
@@ -125,7 +125,7 @@ void Texture::apply_swizzle()
        }
 }
 
-void Texture::set_parameter_i(GLenum param, int value) const
+void Texture::set_parameter_i(unsigned param, int value) const
 {
        if(ARB_direct_state_access)
                glTextureParameteri(id, param, value);