如何使用OpenGL禁用纹理上的模糊效果? [英] How to disable blur effect on textures with OpenGL?
本文介绍了如何使用OpenGL禁用纹理上的模糊效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在OpenGL程序中使用了Texture-Mapped字体. 我已经在位图中绘制了非常基本的字体(每个字母为5x7像素,黑色背景上为白色). 当在大于几个像素的四边形上显示时,OpenGL正在做一些工作来使图像平滑. 有一种简单的方法可以暂时消除这种模糊效果吗?
I am using Texture-Mapped fonts in my OpenGL program. I have drawn very basic fonts in a bitmap (each letter is 5x7 pixels, white on black background). When displayed on a quad that makes more than a few pixels large, OpenGL is making some work to make the image smooth. Is there an easy way to temporarily get rid of that blur effect ?
推荐答案
尝试glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST )
.
这篇关于如何使用OpenGL禁用纹理上的模糊效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文