From b0760b28807b31cc1403584265c07feb87ac4887 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 18 Feb 2011 03:28:31 +0100 Subject: some collada work, and an unfinished OGL renderer using OpenTK. huge commit --- NW4RTools/Models/OpenGL/GLDisplayList.cs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 NW4RTools/Models/OpenGL/GLDisplayList.cs (limited to 'NW4RTools/Models/OpenGL/GLDisplayList.cs') diff --git a/NW4RTools/Models/OpenGL/GLDisplayList.cs b/NW4RTools/Models/OpenGL/GLDisplayList.cs new file mode 100644 index 0000000..180e89e --- /dev/null +++ b/NW4RTools/Models/OpenGL/GLDisplayList.cs @@ -0,0 +1,31 @@ +using System; +using OpenTK; +using OpenTK.Graphics; +using OpenTK.Graphics.OpenGL; + +namespace NW4RTools.Models.OpenGL { + public class GLDisplayList : IDisposable { + public readonly int ListID; + + public GLDisplayList() { + ListID = GL.GenLists(1); + } + + void IDisposable.Dispose() { + GL.DeleteLists(ListID, 1); + } + + public void Begin() { + GL.NewList(ListID, ListMode.Compile); + } + + public void End() { + GL.EndList(); + } + + public void Execute() { + GL.CallList(ListID); + } + } +} + -- cgit v1.2.3