Results 1 to 3 of 3

Thread: Irritating gotcha with textures

  1. #1

    Irritating gotcha with textures

    The default texture minification filter is GL_NEAREST_MIPMAP_LINEAR, which is all well and good if you are using mipmaps, but useless if you aren't and your texture is being drawn small enough to need the minification filter.

    I don't ever expect these incompatible defaults to be fixed... it would be a breaking change.

    I first encountered this a few years ago when I started out with OpenGL and it took me a while to work out. I also struggled to debug this problem last night... since searching the internet and these forums proved practically useless I decided to post it up here.

    Changing the minification filter with glTexParameteri to GL_LINEAR fixes the "problem".

    Why GL_NEAREST is not the default is beyond me though...
    -- Jheriko
    'Everything around us can be represented and understood through numbers'

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Irritating gotcha with textures

    Surprising you did not see it, it is in the faq.
    http://www.opengl.org/resources/faq/...e.htm#text0020

    And each time someone has problems with texturing, I ask to check mipmaps and use GL_LINEAR as min function if they don't understand mipmaps

    Mipmaps are very important since a lot of time to allow both better performance (thanks to tex mem access coherence) and nicer look. No wonder it is the default.
    Even software mode Quake 1 used mipmaps, without bilinear filtering.

  3. #3

    Re: Irritating gotcha with textures

    Quote Originally Posted by ZbuffeR
    No wonder it is the default.
    Right... as opposed to GL_NEAREST, which just /always/ renders some texture (even if its ugly).

    Its a bad default.
    -- Jheriko
    'Everything around us can be represented and understood through numbers'

Similar Threads

  1. model textures being redirected to font textures
    By Tcll5850 in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 09-07-2014, 10:43 PM
  2. FBO Attached Textures Reused as Shader Source Textures
    By Rennie Johnson in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-22-2012, 09:43 PM
  3. FBO Packed depth/stencil gotcha
    By sqrt[-1] in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 02-06-2008, 09:03 AM
  4. Lots of small textures or fewer large textures?
    By jlamanna in forum OpenGL: Advanced Coding
    Replies: 30
    Last Post: 01-12-2004, 03:53 AM
  5. are GL_COLOR_INDEX textures converted to RGBA-Textures?
    By TB-Rex in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-18-2000, 06:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean