[osg-users] Texture borders

zeilstra at gdls.com zeilstra at gdls.com
Tue Sep 4 06:58:41 PDT 2007


I have tracked down the issue with automatic resizing of 1D textures with
borders to the following lines from Texture1D::applyTexImage1D:

if(
   _resizeNonPowerOfTwoHint ||
   !extensions->isNonPowerOfTwoTextureSupported(_min_filter) ||
   inwidth > extensions->maxTextureSize() )
{
   // this is not thread safe... should really create local image data and
   // rescale to that as per Texture2D.
   image->ensureValidSizeForTexturing(extensions->maxTextureSize());
}

(whitespace altered to fit message)

Image::ensureValidSizeForTexturing then resizes the image to the greatest
power of two less than the current dimensions.  So right now there is no
way to have a 1D texture with border pixels.  I suppose this is a bug.
I'll see if I can't figure out a fix.
- Ian Zeilstra




This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.




More information about the osg-users mailing list