Clearify skybox layout.

Turns out quake skynames have left and right backwards.
This commit is contained in:
Bill Currie 2012-02-16 20:42:49 +09:00
parent 4cbe78babb
commit bfdb2b20d5

View file

@ -1280,14 +1280,15 @@ R_LoadSkys (const char *sky)
int i;
// NOTE: quake's world and GL's world are rotated relative to each other
// quake has x right, y in, z up. gl has x right, y up, z out
static const char *sky_suffix[] = { "ft", "bk", "lf", "rt", "up", "dn"};
// However, skymaps have lf and rt swapped :/ lf rt
static const char *sky_suffix[] = { "ft", "bk", "rt", "lf", "up", "dn"};
static int sky_target[] = {
GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_X, // front
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, // back
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, // left (normally -ve Z, see shader)
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, // right (normally +ve Z, see shader)
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, // up
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, // down
};
if (!sky || !*sky)