
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 1.20 KB | hits: 12 | expires: Never
Why can't I translate my plane downwards?
private Vertex[] planeVertices = new[]
{
/*0*/new Vertex(-1, 0, 1, 0,0, 0, 1, 0),
/*1*/new Vertex( 1, 0, 1, 1,0, 0, 1, 0),
/*2*/new Vertex( 1, 0,-1, 1,1, 0, 1, 0),
/*3*/new Vertex(-1, 0,-1, 0,1, 0, 1, 0),
};
planeVao.Bind();
textureSampler.Value = 1;
modelMatrix.Value = new Matrix4(
5, 0, 0, 0,
0, 1, 0, -3,
0, 0, 5, 0,
0, 0, 0, 1);
GL.DrawElements(BeginMode.Triangles, planeIndices.Length,
DrawElementsType.UnsignedInt, IntPtr.Zero);
gl_Position = ProjectionMatrix * ViewMatrix * ModelMatrix * vec4(Position, 1.0);
modelMatrix.Value = new Matrix4(
5, 0, 0, 1,
0, 1, 0, -3,
0, 0, 5, 0,
0, 0, 0, 1);
{(0.8192319, -0.2529707, 0.5146502, 0)
(0, 0.8974438, 0.4411287, 0)
(-0.5734624, -0.3613867, 0.7352146, 0)
(8.940697E-08, -2.235174E-07, -6.800735, 1)}
{(1.299038, 0, 0, 0)
(0, 1.732051, 0, 0)
(0, 0, -1.020202, -1)
(0, 0, -2.020202, 0)}
modelMatrix.Value = new Matrix4(
5, 0, 0, 0,
0, 1, 0, 0,
0, 0, 5, 0,
0, 0, -3, 1);