flopoloco's picture

FOV Projection Matrix (GLM)

Having a look at some examples that use the glm library there is a method to set the projection matrix using a FOV float value. However OpenTK since is similar to XNA Math API, uses the Math.PI/4 algorithm.

Is there anyone know how to convert OpenTK and GLM fov values back and forth?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

You can convert degrees to radians with:

float degress = 45.0f;
float radians = (degrees / 180.0f) * (float)System.Math.PI;