mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
flag to use lower resolution texture
This commit is contained in:
+2
-3
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user