Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override void OnRenderFrame(FrameEventArgs e)
- {
- base.OnRenderFrame(e);
- GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
- int uModelLocation = GL.GetUniformLocation(mShader.ShaderProgramID, "uModel");
- Matrix4 m1 = Matrix4.CreateTranslation(0.6f, 0, 0);
- m1 = Matrix4.Mult(m1, Matrix4.CreateRotationZ(0.8f));
- GL.UniformMatrix4(uModelLocation, true, ref m1);
- GL.BindVertexArray(mVAO_ID);
- GL.DrawElements(BeginMode.Triangles, mModel.Indices.Length, DrawElementsType.UnsignedInt, 0);
- m1 = Matrix4.CreateTranslation(-0.4f, -0.6f, 0);
- m1 = Matrix4.Mult(m1, Matrix4.CreateRotationZ(-0.4f));
- GL.UniformMatrix4(uModelLocation, true, ref m1);
- GL.BindVertexArray(mVAO_ID);
- GL.DrawElements(BeginMode.Triangles, mModel.Indices.Length, DrawElementsType.UnsignedInt, 0);
- GL.BindVertexArray(0);
- this.SwapBuffers();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement