internal void Draw() { GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); var currentTime = (float)time.Elapsed.TotalSeconds; var modelViewProjection = Matrix4.CreateOrthographic(15, 15, -15, 15); // use a projection also for handedness change! #if SOLUTION var rotation = Matrix4.CreateRotationY(currentTime); modelViewProjection = rotation * modelViewProjection; #endif shaderProgram.Activate(modelViewProjection, currentTime); vertexArray.Draw(); }
internal void Draw() { GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); var modelViewProjection = Matrix4.Identity; #if SOLUTION var rotation = Matrix4.CreateRotationX(-0.5f * MathF.PI); var projection = Matrix4.CreateOrthographic(4, 4, -4, 4); // use a projection also for handedness change! modelViewProjection = projection; #endif shaderProgram.Activate(modelViewProjection); vertexArray.Draw(); }