mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
Clearify skybox layout.
Turns out quake skynames have left and right backwards.
This commit is contained in:
parent
4cbe78babb
commit
bfdb2b20d5
1 changed files with 8 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue