PDA

View Full Version : Problem to load bordered 3D texture



osung
04-05-2005, 11:29 PM
Hi,

I have a trouble to load 258x514x258 3D texture with border.
When I load a 256x512x256 texture and 258x258x258 bordered texture, it's OK.
but when I load 258x514x258 texture, the window is locked on and never replys.
I also checked with proxy texture and glGetTexLevelParameteriv, but there's no error.

Here's my GL codes

glGenTextures(1, &(volume->volName));
glBindTexture(GL_TEXTURE_3D, volume->volName);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER_ARB);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER_ARB);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER_ARB);

glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glTexImage3D(GL_TEXTURE_3D, 0, GL_INTENSITY, width, height, depth, 1, GL_LUMINANCE, GL_FLOAT, volume->data);

What should be a problem?

My platform is Geforce6800GT 256MB and Redhat Linux 8.0

Thank you in advance.

plasmonster
04-06-2005, 07:23 PM
It sounds like you're getting a software path.

Have you tried other wrap modes, like CLAMP_TO_EDGE?

osung
04-07-2005, 12:05 AM
CLAMP_TO_EDGE and others also fail. :(

I guest it would be a nvidia driver's bug.

I'v tested 514x66x66 - it must be suitable for 256MB memory - but it also doesn't run.

plasmonster
04-07-2005, 01:55 AM
Hmmm ... this arrangement hits the slow path on my FX too, like a pig on stilts. This isn't a bug, though, and it's not your memory. It appears that 3D textures with borders and any dimension of 512 (MAX_3D_TEXTURE_SIZE) aren't accelerated.

Say, can't you use NPOT textures on that card? If so, you could try something slightly less than 512 and see how that goes.