blob: 180e89eb33d8cc97f509c7f145d150f996e968f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
}
}
}
|