diff --git a/texture.cpp b/texture.cpp index 504d7a5..503e822 100755 --- a/texture.cpp +++ b/texture.cpp @@ -15,7 +15,7 @@ using namespace std; namespace vb01{ - Texture::Texture(int width, int height, bool shadowMap) : Animatable(Animatable::TEXTURE){ + Texture::Texture(int width, int height, bool shadowMap, bool hiRes) : Animatable(Animatable::TEXTURE){ this->width = width; this->height = height; texture = new u32; @@ -33,8 +33,7 @@ namespace vb01{ glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor); } else{ - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, NULL); - //glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA16F,width,height,0,GL_RGB,GL_UNSIGNED_BYTE,NULL); + glTexImage2D(GL_TEXTURE_2D, 0, (hiRes ? GL_RGB16F : GL_RGB), width, height, 0, GL_RGB, GL_FLOAT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); diff --git a/texture.h b/texture.h index d6f88e8..bb00acc 100755 --- a/texture.h +++ b/texture.h @@ -15,7 +15,7 @@ namespace vb01{ class Texture : public Animatable{ public: ~Texture(); - Texture(int, int, bool = true); + Texture(int, int, bool = true, bool = false); Texture(std::string[], int, bool, int = 0, bool = false, std::string = ""); Texture(int, bool = true, int = 0, std::string = ""); Texture(FT_Face);