mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 16:07:40 +00:00
- fixed plane access in GL code.
This commit is contained in:
parent
7486e24cd9
commit
f6b33acbb1
2 changed files with 10 additions and 13 deletions
|
@ -275,14 +275,18 @@ public:
|
||||||
|
|
||||||
void SetGlowPlanes(const secplane_t &top, const secplane_t &bottom)
|
void SetGlowPlanes(const secplane_t &top, const secplane_t &bottom)
|
||||||
{
|
{
|
||||||
mGlowTopPlane.Set(top.fA(), top.fB(), 1. / top.fC(), top.fD());
|
DVector3 tn = top.Normal();
|
||||||
mGlowBottomPlane.Set(bottom.fA(), bottom.fB(), 1. / bottom.fC(), bottom.fD());
|
DVector3 bn = bottom.Normal();
|
||||||
|
mGlowTopPlane.Set(tn.X, tn.Y, 1. / tn.Z, top.fD());
|
||||||
|
mGlowBottomPlane.Set(bn.X, bn.Y, 1. / bn.Z, bottom.fD());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSplitPlanes(const secplane_t &top, const secplane_t &bottom)
|
void SetSplitPlanes(const secplane_t &top, const secplane_t &bottom)
|
||||||
{
|
{
|
||||||
mSplitTopPlane.Set(top.fA(), top.fB(), 1. / top.fC(), top.fD());
|
DVector3 tn = top.Normal();
|
||||||
mSplitBottomPlane.Set(bottom.fA(), bottom.fB(), 1. / bottom.fC(), bottom.fD());
|
DVector3 bn = bottom.Normal();
|
||||||
|
mSplitTopPlane.Set(tn.X, tn.Y, 1. / tn.Z, top.fD());
|
||||||
|
mSplitBottomPlane.Set(bn.X, bn.Y, 1. / bn.Z, bottom.fD());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDynLight(float r, float g, float b)
|
void SetDynLight(float r, float g, float b)
|
||||||
|
|
|
@ -227,16 +227,9 @@ void Plane::Init(float a, float b, float c, float d)
|
||||||
|
|
||||||
void Plane::Set(secplane_t &plane)
|
void Plane::Set(secplane_t &plane)
|
||||||
{
|
{
|
||||||
float a, b, c, d;
|
m_normal.Set(plane.Normal().X, plane.Normal().Z, plane.Normal().Y);
|
||||||
|
|
||||||
a = (float)plane.fA();
|
|
||||||
b = (float)plane.fB();
|
|
||||||
c = (float)plane.fC();
|
|
||||||
d = (float)plane.fD();
|
|
||||||
|
|
||||||
m_normal.Set(a, c, b);
|
|
||||||
//m_normal.Normalize(); the vector is already normalized
|
//m_normal.Normalize(); the vector is already normalized
|
||||||
m_d = d;
|
m_d = plane.fD();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue