Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Stop blending

  1. #1
    Guest

    Stop blending

    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:


    How can I stop it from blending them?

    Many thanks in advance.

    Dillie

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,142

    Re: Stop blending

    glTexParameteri(GL_TEXTURE2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    glTexParameteri(GL_TEXTURE2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

  3. #3
    Guest

    Re: Stop blending

    Many thanks!!!

    You get the gold star.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •