fixed box texture filtering
This commit is contained in:
parent
6c0b9f7f34
commit
890dc9b29f
@ -169,7 +169,7 @@ void draw_box() {
|
|||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||||
glfwLoadTexture2D("data/wall.tga", GLFW_BUILD_MIPMAPS_BIT);
|
glfwLoadTexture2D("data/wall.tga", GLFW_BUILD_MIPMAPS_BIT);
|
||||||
} else {
|
} else {
|
||||||
glBindTexture(GL_TEXTURE_2D, wallTex);
|
glBindTexture(GL_TEXTURE_2D, wallTex);
|
||||||
@ -189,7 +189,7 @@ void draw_box() {
|
|||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslated(2000.0, 0.0, 0.0);
|
glTranslated(2000.0, 0.0, 0.0);
|
||||||
//glScaled(5000.0f, 5000.0f, 5000.0f);
|
//glScaled(5000.0f, 5000.0f, 5000.0f);
|
||||||
float s = 3000.0f, t = 5.0f;
|
float s = 3000.0f, t = 10.0f;
|
||||||
// Just in case we set all vertices to white.
|
// Just in case we set all vertices to white.
|
||||||
glColor4f(1, 1, 1, 1);
|
glColor4f(1, 1, 1, 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user