Created
January 2, 2013 17:14
-
-
Save bgK/4436210 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/engines/myst3/gfx.cpp b/engines/myst3/gfx.cpp | |
index 9c5b4f7..66a1ce1 100644 | |
--- a/engines/myst3/gfx.cpp | |
+++ b/engines/myst3/gfx.cpp | |
@@ -77,8 +77,10 @@ OpenGLTexture::OpenGLTexture(const Graphics::Surface *surface) { | |
height = surface->h; | |
format = surface->format; | |
- internalHeight = upperPowerOfTwo(height); | |
- internalWidth = upperPowerOfTwo(width); | |
+// internalHeight = upperPowerOfTwo(height); | |
+// internalWidth = upperPowerOfTwo(width); | |
+ internalHeight = height; | |
+ internalWidth = width; | |
if (format.bytesPerPixel == 4) { | |
internalFormat = GL_RGBA; | |
@@ -92,8 +94,10 @@ OpenGLTexture::OpenGLTexture(const Graphics::Surface *surface) { | |
glGenTextures(1, &id); | |
glBindTexture(GL_TEXTURE_2D, id); | |
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, internalWidth, internalHeight, 0, internalFormat, sourceFormat, 0); | |
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); | |
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); | |
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | |
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | |
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | |
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | |
update(surface); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment