OpenGL Texture Blur?

Started by
3 comments, last by CryoGenesis 11 years, 8 months ago
Hey, in opengl when I load a texture and stretch it across a face it blurs the picture a bit. I'm guessing this is openGL's default way of stretching textures.
Is there a way to change it from texture blur to just normal stretch?
For instance: I've drawn an 8*8 pixel image in gimp or something and I put it on a face of a cube in opengl, opengl decides to blur the texture. Pixel effect is ruined.
Surely openGl has an option to set the texture mode to no blur?
Thanks in advance.
+1 rep for solution.
Advertisement
Set GL_TEXTURE_MAG_FILTER to GL_NEAREST instead of GL_LINEAR.

Set GL_TEXTURE_MAG_FILTER to GL_NEAREST instead of GL_LINEAR.


In my opengl initialization code?
After you've bound the texture with glBindTexture

After you've bound the texture with glBindTexture


Thanks!

This topic is closed to new replies.

Advertisement