OpenGL 3D texture and GL_CLAMP_TO_BORDER?

  • Follow


Hi all,
Is there any restriction in bordered 3D texture and GL_CLAMP_TO_BORDER clamp
mode?

I have a 66*66*66 bordered 3D texture,
and I use
glTexParameteri ( GL_TEXTURE_3D, GL_TEXTURE_WRAP_X, GL_CLAMP_TO_BORDER);
glTexImage3D(GL_TEXTURE_3D, 0, 2, 66, 66, 66, 1, GL_RGBA, GL_UNSIGNED_BYTE,
pTex);
I runed the program on a GeForce4 card.
but the program freezes with out error (glGetError() == GL_NO_ERROR)

If I change the clamp mode to
glTexParameteri ( GL_TEXTURE_3D, GL_TEXTURE_WRAP_[S,T,R], GL_CLAMP);

then the program runs well,
though the edge color is used rather than border color.

If I use a 64*64*64 non-bordered texture and
glTexParameterfv( GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, borderColor);
glTexImage3D(GL_TEXTURE_3D, 0, 2, 64, 64, 64, 0, GL_RGBA, GL_UNSIGNED_BYTE,
pTex);
the program also runs well,
but I really need the border color to be some neighboring image color.

Is this a implementation problem or CLAMP_TO_BORDER is not supported under
bordered 3D texture?


0
Reply malchut 5/25/2004 9:48:40 AM


0 Replies
477 Views

(page loaded in 0.017 seconds)

Similiar Articles:






7/24/2012 2:21:47 PM


Reply: