Setting up cube map texture parameters in OpenGL

Posted by KaiserJohaan on Game Development See other posts from Game Development or by KaiserJohaan
Published on 2013-11-09T14:53:36Z Indexed on 2013/11/09 16:16 UTC
Read the original article Hit count: 415

Filed under:
|
|

I see alot of tutorials and sources use the following code snippet when defining each face of a cube map:

for (i = 0; i < 6; i++)
    glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, InternalFormat, size, size, 0, Format, Type, NULL);

Is it safe to assume GL_TEXTURE_CUBE_MAP_POSITIVE_X + i will properly iterate the following cube map targets, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y etc?

© Game Development or respective owner

Related posts about opengl

Related posts about c++