flag to use lower resolution texture

This commit is contained in:
devZoGok
2025-07-19 16:03:02 +03:00
parent 44a221d24b
commit 2341a4b1cc
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -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);
+1 -1
View File
@@ -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);