Crystal Space
Welcome, Guest. Please login or register.
April 16, 2014, 08:28:40 am

Login with username, password and session length
Search:     Advanced search
8990 Posts in 2037 Topics by 7579 Members
Latest Member: Brianmatthews
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Crystal Space Project Development / Bug Reports / Re: SetFOVAngle has a wrong aspect ratio on: November 12, 2013, 12:27:23 pm
i think the problem is in
void PerspectiveImpl::UpdateMatrix ()
{
  if (!matrixDirty) return;

  matrix = CS::Math::Projections::CSPerspective (1.0f,
    aspect, shift_x, shift_y*aspect, inv_aspect, nearClip);

  matrixDirty = false;
  invMatrixDirty = true;
}

it should use the default_aspect. like this?

void PerspectiveImpl::UpdateMatrix ()
{
  if (!matrixDirty) return;

  matrix = CS::Math::Projections::CSPerspective (1.0f,
    default_aspect, shift_x, shift_y*default_aspect, inv_aspect, nearClip);

  matrixDirty = false;
  invMatrixDirty = true;
}

now the simplept tutorial seams worf fine.
2  Crystal Space Project Development / Bug Reports / SetFOVAngle has a wrong aspect ratio on: November 12, 2013, 10:52:27 am
Try SetFOVAngle(110, 1.0f) and SetFOVAngle(20, 1.0f) in simplept application.
The field of height is constant and the image is only deformed in width. This not allow to use this function like a real zoom. I try it on crystalspace 1.0 and it worked right but in crystalspace 2.1 the image not respect the aspectratio and the field of height is constant. The projection matrix has some trouble?
I used the simplept to testing it changing the line pcam->SetFOVAngle(20, 1.0f); in CreateRoom
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 2.091 seconds with 17 queries.