3D texture coordinates for a cube

Posted by Roshan on Game Development See other posts from Game Development or by Roshan
Published on 2012-12-13T14:11:13Z Indexed on 2012/12/13 17:17 UTC
Read the original article Hit count: 389

I want to use glTexImage3D with cube. what will be the texture coordinates for it? i am using GL_TEXTURE_3D as target. I tried with u v coordinates same as 2d texture coordinates with z component 0-depth for each face. But that goes wrong.

How to apply each layer to each face of the cube with target= GL_TEXTURE_3D?

Lets assume i have 8 layers of 2D images in my 3D texture. I want all 8 layers to apply on each of the cube and not 1 layer on 1 face of the cube.

© Game Development or respective owner

Related posts about opengl

Related posts about 3d