PDA

View Full Version : Stop blending



10-06-2006, 02:39 AM
Hi,

I'm trying to render a basic texture to a polygon, but I don't want OGL to blend or smooth the values between the pixels in my poly, I just want them looking blocky and square. How can I do this?

I've tried setting the following things:

glShadeModel(GL_FLAT);
glDisable(GL_BLEND);
glDisable(GL_DITHER);


But it to no avail. This is how it looks when displaying a 4x4 texture of random colored pixels:
http://thegrapevine.brinkster.net/jlGui_1/ogl.JPG

How can I stop it from blending them?

Many thanks in advance.

Dillie

Overmind
10-06-2006, 02:55 AM
glTexParameteri(GL_TEXTURE2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

10-06-2006, 03:05 AM
Many thanks!!!

You get the gold star. :p