Jump to content

View more

Image of the Day

The beast has a mighty searchlight of evil! #screenshotsaturday https://t.co/bzKepOojDL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

OpenGL Texture Blur?

4: Adsense

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 CryoGenesis   Members   

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 japro   Members   

887
Like
4Likes
Like

Posted 16 August 2012 - 05:30 PM

Set GL_TEXTURE_MAG_FILTER to GL_NEAREST instead of GL_LINEAR.

#3 CryoGenesis   Members   

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 zacaj   Members   

663
Like
2Likes
Like

Posted 16 August 2012 - 05:51 PM

After you've bound the texture with glBindTexture

#5 CryoGenesis   Members   

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.