mirror of
https://github.com/ApfelTeeSaft/vb01.git
synced 2026-08-26 19:33:45 +00:00
flag to use lower resolution texture
This commit is contained in:
+2
-3
@@ -15,7 +15,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace vb01{
|
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->width = width;
|
||||||
this->height = height;
|
this->height = height;
|
||||||
texture = new u32;
|
texture = new u32;
|
||||||
@@ -33,8 +33,7 @@ namespace vb01{
|
|||||||
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
|
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, NULL);
|
glTexImage2D(GL_TEXTURE_2D, 0, (hiRes ? GL_RGB16F : GL_RGB), width, height, 0, GL_RGB, GL_FLOAT, NULL);
|
||||||
//glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA16F,width,height,0,GL_RGB,GL_UNSIGNED_BYTE,NULL);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
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_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace vb01{
|
|||||||
class Texture : public Animatable{
|
class Texture : public Animatable{
|
||||||
public:
|
public:
|
||||||
~Texture();
|
~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(std::string[], int, bool, int = 0, bool = false, std::string = "");
|
||||||
Texture(int, bool = true, int = 0, std::string = "");
|
Texture(int, bool = true, int = 0, std::string = "");
|
||||||
Texture(FT_Face);
|
Texture(FT_Face);
|
||||||
|
|||||||
Reference in New Issue
Block a user