mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 08:30:49 +00:00
- allow 90° rotations in skybox sectors.
This commit is contained in:
parent
0a35027f67
commit
8a010ab871
1 changed files with 12 additions and 8 deletions
|
@ -339,33 +339,37 @@ void GLFlat::DrawSkyboxSector(int pass, bool processlights)
|
|||
}
|
||||
|
||||
float z = plane.plane.ZatPoint(0., 0.) + dz;
|
||||
static float uvals[] = { 0, 0, 1, 1 };
|
||||
static float vvals[] = { 1, 0, 0, 1 };
|
||||
int rot = -xs_FloorToInt(plane.Angle / 90.f);
|
||||
|
||||
|
||||
ptr->x = minx;
|
||||
ptr->z = z;
|
||||
ptr->y = miny;
|
||||
ptr->u = 0;
|
||||
ptr->v = 1;
|
||||
ptr->u = uvals[rot & 3];
|
||||
ptr->v = vvals[rot & 3];
|
||||
ptr++;
|
||||
|
||||
ptr->x = minx;
|
||||
ptr->z = z;
|
||||
ptr->y = maxy;
|
||||
ptr->u = 0;
|
||||
ptr->v = 0;
|
||||
ptr->u = uvals[(rot + 1) & 3];
|
||||
ptr->v = vvals[(rot + 1) & 3];
|
||||
ptr++;
|
||||
|
||||
ptr->x = maxx;
|
||||
ptr->z = z;
|
||||
ptr->y = maxy;
|
||||
ptr->u = 1;
|
||||
ptr->v = 0;
|
||||
ptr->u = uvals[(rot + 2) & 3];
|
||||
ptr->v = vvals[(rot + 2) & 3];
|
||||
ptr++;
|
||||
|
||||
ptr->x = maxx;
|
||||
ptr->z = z;
|
||||
ptr->y = miny;
|
||||
ptr->u = 1;
|
||||
ptr->v = 1;
|
||||
ptr->u = uvals[(rot + 3) & 3];
|
||||
ptr->v = vvals[(rot + 3) & 3];
|
||||
ptr++;
|
||||
|
||||
GLRenderer->mVBO->RenderCurrent(ptr, GL_TRIANGLE_FAN);
|
||||
|
|
Loading…
Reference in a new issue