PDA

View Full Version : FBO and Texture3D



API
08-11-2005, 10:05 AM
Hi, i have a Geforce5900 and i have problems using FBO and texture3D. With GL_TEXTURE_2D i have no problem, but when i use something like:

glGenFramebuffersEXT(1, &fb);
/*errcheck(); */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb);

glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_3D, tex);

glTexImage3D(GL_TEXTURE_3D, 0,
internalFormat,
textureSize, textureSize, 4, 0,
format,
type,
NULL);

glFramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_3D, tex, 0, 0);


//see if everything is OK
if(CHECK_FRAMEBUFFER_OK())
{
printf("Supported combination: (%i, %i, %i) !!! - Press a key\n",
internalFormat, format, type);
getchar();
}

I tried a lot of possibilities with internalFormat, format and type, but nothing ¿anyone has a idea? I supposed that if my card support glFramebufferTexture3DEXT should exist some combination that works.

thanks for your attention

API

jide
08-11-2005, 12:22 PM
If I remember well what I read in the specs, there must have something to do with z offsets. I think you must ensure they all are well ranged. I don't remember thought since I didn't focused on it.

FBO's specs are at this address:

http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt

Hope that helps.

API
08-12-2005, 10:58 AM
Thanks for your tip, but there are only two limits reffers to z-offset:
* It cannot be greater than GL_MAX_TEXTURE_3D_SIZE_EXT
* It cannot be greater than the depth of the texture 3D.

But I dont have this faults.

Anyone have another idea?

API

Roderic (Ingenu)
08-12-2005, 11:19 AM
Drivers and/or hardware don't support that yet AFAIR.

Meaning you just can't do that yet.
I think you should search the board I remember having seen something about that not too long ago.