Commit fd266789 authored by Mike Kremer's avatar Mike Kremer
Browse files

Corrected fovy and aspect calculations in GLState.cc

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8803 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0a20978f
......@@ -751,18 +751,18 @@ void GLState::set_multisampling(bool _b)
double GLState::fovy() const
{
assert(projection_(0,0) != 0.0);
assert(projection_(1,1) != 0.0);
return atan(1.0/projection_(0,0))*2.0;
return atan(1.0/projection_(1,1))*2.0;
}
//-----------------------------------------------------------------------------
double GLState::aspect() const
{
assert(projection_(1,1) != 0.0);
assert(projection_(0,0) != 0.0);
return projection_(0,0) / projection_(1,1);
return projection_(1,1) / projection_(0,0);
}
//-----------------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment