Cube mapping... which image is which?

Started by
5 comments, last by cowsarenotevil 20 years, 4 months ago
OK, so, with this image (or similar) can someone fill in the ID numbers for each texture? I''m just not sure which texture should be loaded as which part of the cube map... I hope that makes some sense. If I''m being incredibly stupid please don''t refrain from telling me.
-~-The Cow of Darkness-~-
Advertisement
______
| |
_____| nx |___________
| pz py nz | ny |
|_____ _______|____|
| px |
|_____|

??? maybe this will work (common sense only)

ps where did you get your textures?
That one was on the nVidia website, but the one I''m actually using I made. But I''m slightly confused by your labels. I''m just looking for numbers 1-6 so I know which to store it as when I load the textures. I guess I can get it by trial and error fairly easily though.

-~-The Cow of Darkness-~-

are you actually referring to a cube map or some sorta sky box? If you are refering to a cube map then what the previous poster gave you seems to be correct, logical atleast. If you mean a sky box then it doesn''t matter what order you load what, just display them in the correct place.

nx = negative x, etc all others with n
py = positive y, etc all others with p


p.s. you are being incredibly stupid
Yes, I am talking about cube mapping, and all I''m wondering is that when you use

glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT + (some number), etc...

what values of (some number) correlate to which part of the cube (top, bottom, front, back, left, right).

-~-The Cow of Darkness-~-
just look in the header what the constants are..

but to help you, this is the order
GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $8515; (right)
GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $8516; (left)
GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $8517; (top)
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $8518; (bottom)
GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $8519; (behind camera)
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $851A; (in front of camera)


values inside () suppose you are inside the cubemap

[edited by - MazyNoc on December 16, 2003 2:35:20 AM]
Ah, I get it now! I was being incredibly stupid after all.

Thank you.

-~-The Cow of Darkness-~-

This topic is closed to new replies.

Advertisement