Archived

This topic is now archived and is closed to further replies.

stu_pb

3D Textures

Recommended Posts

I''ve looked at the specs on glTexImage3D and I have just one more question. In the specs it says that the pixels parameter to glTexImage3D is read from the bottom left to the top right pixel. However, it doesn''t mention if it reads a row across and then another row across a pixel "deeper", or if it reads a row "deep" and then moves to the next pixel across.

anyone know what order it reads, Thanks?

Share this post


Link to post
Share on other sites
Think of a 2D texture thats 3x3 in size:

111
222
333

glTexImage2D will read this as a linear chunk of memory like this:

111222333

In a 3D texture, its just composed of a number of 2D textures that are treated as adjacent rectangles in memory.

Share this post


Link to post
Share on other sites