Alex Rivera | Logout

How can I use a 3-D texture in iOS?

Asked 2012-02-11T15:56:45.623
8

I can't find the glTexImage3D() function from OpenGL in OpenGL ES 2.0. So how can I use a 3-D texture, eg: a .tga file?

Does someone know how to use a 3-D texture in OpenGL ES 2.0?

Edit
Report

1 Answer

2

I can't found there is glTexImage3D function in OpenGL ES 2

Because 3D textures are not supported by OpenGL-ES. Think about it: A 3D texture requires a lot more memory than a 2D one. And memory is a very scarce resource on embedded/mobile devices, which is what ES is targeted for.

I think maybe someone knows the algorithm of using 3d texture?

It's not so much a algorithmic problem but one of limited resources. In theory you could use multiple texture units/samplers to upload layers there, and do interpolation in the shader. But this would lack depth mipmaping.

3d texture, eg: .tag file?

TAG file? Sorry, I'm unaware of this format. Could you give me a link to read it up? Google didn't find usefull information on it. Did you maybe mean TGA?

answered 2012-02-11T16:07:13.787

Your Answer