Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411491 Posts in 69377 Topics- by 58433 Members - Latest Member: graysonsolis

April 29, 2024, 09:46:49 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Disable anti-aliasing in opengl
Pages: [1]
Print
Author Topic: Disable anti-aliasing in opengl  (Read 2694 times)
Tycho Brahe
Level 10
*****

λx.x


View Profile
« on: March 06, 2010, 12:10:43 PM »

Does anyone know how to disable anti-aliasing when rendering opengl textures?
When I render an opengl texture I get pretty obvious blurring around the edges of the texture (see image), especaially with semi-transparent textures. I've looked into glTexparameteri but either I'm using it incorrectly or its not working.

I'm using soil to load my images (.png) directly into an opengl texture, so I don't have much control over their loading.

Thanks in advance.

As an example of somthing I DONT want, I present this image:
http://fc03.deviantart.net/fs70/f/2010/065/2/e/Anti_aliasing_example_by_14113.png
Logged
Glaiel-Gamer
Guest
« Reply #1 on: March 06, 2010, 12:30:23 PM »

anti alias is off by default, change your texture filter from GL_LINEAR to GL_NEAREST
Logged
Rob Lach
Level 10
*****



View Profile WWW
« Reply #2 on: March 06, 2010, 01:19:13 PM »

anti alias is off by default, change your texture filter from GL_LINEAR to GL_NEAREST

This actually a pretty good source which explains all the differences:

http://gregs-blog.com/2008/01/17/opengl-texture-filter-parameters-explained/
Logged

Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #3 on: March 06, 2010, 02:03:41 PM »

Thanks, that blog post was invaluable, problem solved!

also very useful was the earlier post by the same guy here
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic