X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture.cpp;h=33a7b21ba8b429c63311cffdb4635f947e0f3201;hb=acaefb4c669f01855252818ef0a2958cbdababc3;hp=5c82dbe535d91a3036c4eed0f0f3e4d93a2e2fdb;hpb=4e9fe48180c7b4646ac2591e172de61f7a693b32;p=libs%2Fgl.git diff --git a/source/core/texture.cpp b/source/core/texture.cpp index 5c82dbe5..33a7b21b 100644 --- a/source/core/texture.cpp +++ b/source/core/texture.cpp @@ -5,7 +5,6 @@ #include #include "error.h" #include "resourcemanager.h" -#include "resources.h" #include "texture.h" using namespace std; @@ -13,7 +12,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 +25,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 +124,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); @@ -147,11 +146,6 @@ void Texture::generate_mipmap() } } -void Texture::load_image(const string &fn, bool) -{ - load_image(fn, 0U); -} - void Texture::load_image(const string &fn, unsigned lv) { Graphics::Image img; @@ -160,11 +154,6 @@ void Texture::load_image(const string &fn, unsigned lv) image(img, lv); } -void Texture::image(const Graphics::Image &img, bool) -{ - image(img, 0U); -} - void Texture::set_debug_name(const string &name) { #ifdef DEBUG