texture magnification filter: linear (blurry) vs. nearest (sharp/pixelatex) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Wed, 06 Dec 2023 22:55:43 +0100
branchv_0
changeset 22 12262f2420de
parent 21 bcc53967ab3c
child 23 42341f66de52
texture magnification filter: linear (blurry) vs. nearest (sharp/pixelatex)
Texture.cpp
--- a/Texture.cpp	Wed Dec 06 22:54:24 2023 +0100
+++ b/Texture.cpp	Wed Dec 06 22:55:43 2023 +0100
@@ -79,7 +79,8 @@
 			img.getData());
 	glTexParameteri(GLT2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 	glTexParameteri(GLT2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-	glTexParameteri(GLT2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+	glTexParameteri(GLT2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // blurry upscale
+	glTexParameteri(GLT2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // sharp upscale
 	glTexParameteri(GLT2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
 	glGenerateMipmap(GLT2D);
 	checkError(&std::cerr);