The Matrix class describes an affine, 2D transformation Matrix. It provides methods to manipulate the matrix in convenient ways, and can be used to transform points. The matrix has the following form: |a c tx| |b d ty| |0 0 1|
Inheritance: SparrowSharp.Pool.PooledObject
Exemplo n.º 1
0
        public void Setup(RenderState state, Matrix modelViewMatrix, float alpha, uint blendMode)
        {
            Alpha = alpha * state.Alpha;
            BlendMode = blendMode == Sparrow.Display.BlendMode.AUTO ? state.BlendMode : blendMode;

            ModelViewMatrix.CopyFromMatrix(state.ModelViewMatrix);
            ModelViewMatrix.PrependMatrix(modelViewMatrix);
        }
Exemplo n.º 2
0
 override protected void ActivateWithPass(int pass, Texture texture, Matrix mvpMatrix)
 {
     GL.UseProgram(_program.Name);
     Matrix4 mvp = mvpMatrix.ConvertToMatrix4();
     GL.UniformMatrix4(_program.Uniforms["uMvpMatrix"], false, ref mvp);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Helper class used by RenderSupport
 /// </summary>
 public RenderState()
 {
     ModelViewMatrix = Matrix.Create();
     Alpha = 1.0f;
     BlendMode = Sparrow.Display.BlendMode.NORMAL;
 }