diff options
author | Treeki <treeki@gmail.com> | 2011-02-18 03:28:31 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-02-18 03:28:31 +0100 |
commit | b0760b28807b31cc1403584265c07feb87ac4887 (patch) | |
tree | dc97346a0c0d0cdcdc066d77df3905a614a858e8 /NW4RTools/Models/OpenGL/GLDisplayList.cs | |
parent | 7d7491feb41bc9724bf63bef545b996226406889 (diff) | |
download | nw4rtools-b0760b28807b31cc1403584265c07feb87ac4887.tar.gz nw4rtools-b0760b28807b31cc1403584265c07feb87ac4887.zip |
some collada work, and an unfinished OGL renderer using OpenTK. huge commit
Diffstat (limited to '')
-rw-r--r-- | NW4RTools/Models/OpenGL/GLDisplayList.cs | 31 |
1 files changed, 31 insertions, 0 deletions
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); + } + } +} + |