nib
05-21-2008, 12:38 PM
On nvidia 8800 gt card, I have a question about texture compression.
I do something like:
gluBuild2DMipmaps(
(mTextureRect) ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D,
(mTextureRect) ? GL_RGBA : GL_COMPRESSED_RGBA ,
width, height,
GL_RGBA,
GL_UNSIGNED_BYTE,
data
);
And this works on the ati 9800 and nvidia 7300 gt. Yet, on the 8800 I get all these lines in my textures. It only happens on textures with transparency. Anyhow, I take out the texture compression and it looks normal. That is, if I use just plain old GL_RGBA .
In the red book, p.392, the book indicates that I just add a GL_COMPRESSED_* before the internal format and gluBuild2DMipmaps would just take care of it. Yet, it looks like its uncompressing and somehow the alpha is not set right and I get stripes. I guess thats called "lossy". ;)
Other things I've read indicate people compress on disk and then load it in. But since I'm not sure what the video card supports in regards to compression, I just let the glu stuff handle it. (?)
I suppose I should not use texture compression for transparent textures ( using the alpha )?
----
I got a nifty new nvidia 8800 gt. Anyhow, I ran the
/System/Library/CoreServices/Expansion Slot Utility.app
I put the new card into slot 1. With slot 4 set to 8x speed. No other cards. Hardware appears to work fine. Runs the glsl fragments shaders really fast. :)
I do something like:
gluBuild2DMipmaps(
(mTextureRect) ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D,
(mTextureRect) ? GL_RGBA : GL_COMPRESSED_RGBA ,
width, height,
GL_RGBA,
GL_UNSIGNED_BYTE,
data
);
And this works on the ati 9800 and nvidia 7300 gt. Yet, on the 8800 I get all these lines in my textures. It only happens on textures with transparency. Anyhow, I take out the texture compression and it looks normal. That is, if I use just plain old GL_RGBA .
In the red book, p.392, the book indicates that I just add a GL_COMPRESSED_* before the internal format and gluBuild2DMipmaps would just take care of it. Yet, it looks like its uncompressing and somehow the alpha is not set right and I get stripes. I guess thats called "lossy". ;)
Other things I've read indicate people compress on disk and then load it in. But since I'm not sure what the video card supports in regards to compression, I just let the glu stuff handle it. (?)
I suppose I should not use texture compression for transparent textures ( using the alpha )?
----
I got a nifty new nvidia 8800 gt. Anyhow, I ran the
/System/Library/CoreServices/Expansion Slot Utility.app
I put the new card into slot 1. With slot 4 set to 8x speed. No other cards. Hardware appears to work fine. Runs the glsl fragments shaders really fast. :)