Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL Texture Blur?


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1   Members   -  Reputation: 528

Like
0Likes
Like

Posted 16 August 2012 - 05:26 PM

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.

#2   Members   -  Reputation: 887

Like
4Likes
Like

Posted 16 August 2012 - 05:30 PM

Set GL_TEXTURE_MAG_FILTER to GL_NEAREST instead of GL_LINEAR.

#3   Members   -  Reputation: 528

Like
0Likes
Like

Posted 16 August 2012 - 05:40 PM

Set GL_TEXTURE_MAG_FILTER to GL_NEAREST instead of GL_LINEAR.


In my opengl initialization code?

#4   Members   -  Reputation: 663

Like
2Likes
Like

Posted 16 August 2012 - 05:51 PM

After you've bound the texture with glBindTexture

#5   Members   -  Reputation: 528

Like
0Likes
Like

Posted 16 August 2012 - 05:57 PM

After you've bound the texture with glBindTexture


Thanks!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS