Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
    
You mean you want to map a cubemap texture onto a cube mesh? –  Archy Dec 13 '12 at 15:07
    
No, I dont want to use cubemap with glTexImage2D. I have added few more details in question, have a look. –  user1737197 Dec 13 '12 at 15:40
    
Unless you're drawing the cube as e.g. a set of points that form a cube-shape, using a 3D texture is going to be essentially identical to just cube-mapping it. Maybe if you go into more detail about the reasons why you want to do this, what effect you're trying to achieve, etc, you may get more useful help; right now it just reads as though you've already decided what the solution is but you're not telling us what the original problem was (no offense intended). –  Jimmy Shelter Dec 13 '12 at 15:55
    
@mh01 I am just implementing the test case for it as per document. –  user1737197 Dec 13 '12 at 16:05
    
I have no idea what you are trying to achieve. It sounds like you are trying to simulate 2d texture arrays using 3d textures? Its very confusing if you mix TEXTURE_3D, Cube and Cube faces, as a TEXTURE_3D is a volume. Perhaps you can add the document you are talking about or some sample code? –  Archy Dec 13 '12 at 16:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.