static unsafe void Main(string[] args) { var Options = WindowOptions.Default; Options.Size = new Silk.NET.Maths.Vector2D <int>(800, 600); Options.Title = "LearnOpenGL with Silk.NET"; var window = Window.Create(Options); window.Render += (obj) => { GL.GetApi(window).ClearColor(Color.Black); GL.GetApi(window).Clear((uint)ClearBufferMask.ColorBufferBit); vao.Bind(); shader.Use(); GL.GetApi(window).DrawElements((GLEnum)PrimitiveType.Triangles, (uint)Indices.Length, GLEnum.UnsignedInt, null); }; window.Load += () => { vbo = new VBO(GL.GetApi(window), Vertices, GLEnum.StaticDraw); ebo = new EBO(GL.GetApi(window), Indices); vao = new VAO(GL.GetApi(window), vbo, ebo); shader = new Abstractions.Shader(GL.GetApi(window), "shader.vert", "shader.frag"); vao.VertexAttributePointer(0, 3, VertexAttribPointerType.Float, 0, 0); }; window.Closing += () => { vbo.Dispose(); ebo.Dispose(); vao.Dispose(); shader.Dispose(); }; window.Run(); }