Anyone has a tutorial about GL_TEXTURE_CUBE_MAP? Say if I loaded a cube map texture, and I have a box. How can I map the cube texture on the box? I mean, in TEXTURE_2D, we have:
A cube map is sampled using a direction vector, {x,y,z}, instead of traditional texture coordinates. It’s normally used for approximating ray-tracing algorithms, like reflections and shadowing. I suppose you could texture a cube with it, but it’s really not well suited to surface texturing.