Exemple #1
0
 public void Bind(ShaderProgram shader, GLControl control)
 {
     Matrix4 proj = Matrix4.CreatePerspectiveFieldOfView(MathHelper.DegreesToRadians(60.0f), (float)control.Width / control.Height, 0.1f, 10000.0f);
     Matrix4 view = Matrix4.LookAt(_position, _position + _forward, _up);
     shader.SetUniform("proj", proj);
     shader.SetUniform("view", view);
 }