mipmaps LOD bias

bensta00
Unregistered
 
Post: #1
Hi all,

I need to access the different levels of a mipmap. I have implemented this previously on 'doze using

glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, x);

where x is the mipmap level. OS X doesn't complain about me using this, but it doesn't seem to be working. Anyone know if this does/doesn't work, if I'm doing something wrong, or if there's an alternative.

I'm using Cg fragment shaders to process the textures, so is there a way in Cg to access them?

Thanks,

Ben
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #2
That works fine for me here. Just make sure x is in the range [-MAX_TEXTURE_LOD_BIAS, MAX_TEXTURE_LOD_BIAS] where MAX_TEXTURE_LOD_BIAS is a floating point number and is hardware-dependent. For example on Rage128/Radeon/Radeon7500, it is 1.0, not very useful. Other cards go from [-16.0 to 16.0].
Quote this message in a reply
bensta00
Unregistered
 
Post: #3
Thanks, God I'm so stupid...

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR_MIPMAP_NEAREST);

...would have helped! Blink

Thanks though :-)
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  MipMaps OptimisticMonkey 4 5,437 Feb 17, 2011 07:17 PM
Last Post: Holmes
  Pixel Buffers, Cocoa, and Mipmaps bensta00 10 5,559 Jan 24, 2005 02:11 PM
Last Post: arekkusu