Ejemplo n.º 1
0
        private static int CreateVAO()
        {
            int vaoID;

            GL.GenVertexArrays(1, out vaoID);
            GL.BindVertexArray(vaoID);
            vaos.Add(vaoID);
            return(vaoID);
        }
Ejemplo n.º 2
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            Scene.DrawScene();

            GL.BindVertexArray(0);

            Context.SwapBuffers();
            base.OnRenderFrame(e);
        }
Ejemplo n.º 3
0
        protected override void OnUnload(EventArgs e)
        {
            GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
            GL.BindVertexArray(0);
            GL.UseProgram(0);

            Scene.ClearHandles();

            Shader?.Dispose();
            LampShader?.Dispose();

            base.OnUnload(e);
        }
Ejemplo n.º 4
0
 private static void UnbindVAO()
 {
     GL.BindVertexArray(0);
 }