View Full Version : How large size does glTexImage3D support?

06-12-2006, 08:38 PM
When I set one dimension size of 3D texture to 1024,The texture seems wrong. All texture have the same color which is the first index color I setted.Why?

06-13-2006, 01:14 AM
It is GPU dependent.
You can try this in OpenGL code:
GLint max3dsize=0;
glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &max3dsize);

Or any program for checking your GPU (e.g OpenGL extension viewer)


06-13-2006, 01:22 AM
You need to query glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &size).
Todays HW can support up to 512^3, but that doesn't mean you can load that!
For one byte per texel 512^3 already needs 128MB and available texture memory is limited.
You would have to use proxy textures to check if it fits.
That is why 3D volume rendering is normally done with smaller volume bricks.

Add glGetError calls during debugging.
Read the OpenGL 2.0 spec.
Search the internet for volume bricking.

06-13-2006, 03:34 AM
Thank you. I think I will go further in Volume Rendering domain.