PDA

View Full Version : glTexImage3D data



jacktca
04-19-2012, 03:37 PM
I have been getting to know the ins and outs of glTexImage3D. One thing that is still missing in my brain is exactly how the data is layed out. I know it's width*height*depth*4 in size. Have any of you seen some good documentation or diagrams on the topic of data layout within that vast size? I have read the *4 refers to voxels. Is each voxel 24 bits = red-green-blue-opaque? Are the voxels arranged (row (aka width) * height (aka height)) * depth? Or is there another layout structure involved within the data?

V-man
04-20-2012, 04:03 AM
3D textures are stored as slices. Each slice is width * height.
There would be Z number of slices where Z = depth

As for the *4
http://www.opengl.org/wiki/Common_Mistakes#Unsupported_formats_.233