PDA

View Full Version : Using CubeMap faces as 2D textures



RGHP
11-08-2007, 06:38 AM
Hi
It's posible to use the cube map faces as 2D textures, without texture coord generation?.

Trenki
11-08-2007, 08:17 AM
Short answer (unless you can be more specific): no.
A cube map is comprised of 6 2d faces but it is always addressed with a 3d vector.

[ www.trenki.net (http://www.trenki.net) | vector_math (3d math library) (http://www.trenki.net/content/view/16/36/) | software renderer (http://www.trenki.net/content/view/18/38/) ]

ZbuffeR
11-08-2007, 09:48 AM
Maybe you want to use glTexCoord3f manually ?

RGHP
11-08-2007, 02:13 PM
Well, I post this beacuse when I started to read OpenGL2.1 specifications there is a section with this statements:

- An image is a 2D texture
- A cubemap have 6 images
- A 3DTexture is a collection of many images

So I thought that maybe there is a way to load only 'Images' and then use something like

GLuint glCreateCubemap(GLuint texojb, GLuint* faces);
GLuint glCreate3DTexture(GLuint texobj, GLuint* layers, GLint depth).

Or something like that. We could save a lot of space with that. I'm dreaming too much?:S

Jan
11-09-2007, 04:51 AM
You don't say what you are actually trying to do. How should we be able to help you then?

V-man
11-10-2007, 05:33 AM
If you need 2D textures, then use 2D textures.
glCreateCubemap and glCreate3DTexturedon't exist. If you want to learn to use cubemaps, developer.nvidia.com has demoes.
The SDK contains a lot of demoes and is large but you can download some of the demoes one by one.