Beispiel #1
0
        public static Matrix4f CreateRotationMatrix(float rotation)
        {
            Matrix4f matrix = new Matrix4f();

            var sin = System.Math.Sin(rotation);
            var cos = System.Math.Cos(rotation);

            matrix[0] = (float)cos;
            matrix[1] = (float)-sin;
            matrix[4] = (float)sin;
            matrix[5] = (float)cos;

            return matrix;
        }
Beispiel #2
0
 public void SetUniform(string name, Matrix4f value)
 {
     GL.UniformMatrix4fv(GetUniformLocation(name), 1, false, value.Data);
 }