Beispiel #1
0
        internal static void Initialize()
        {
            Vector[] vertexBufferArray =
            {
                new Vector(-1, -1),
                new Vector(-1,  1),

                new Vector(1,   1),
                new Vector(1,  -1),
            };

            vertexBuffer = new GLABuffer <Vector> (4, 0, vertexBufferArray, GLABufferUsage.PerVertex);

            Vector[] uvBufferArray =
            {
                new Vector(0, 0),
                new Vector(0, 1),

                new Vector(1, 1),
                new Vector(1, 0),
            };

            uvBuffer           = new GLABuffer <Vector> (4, 1, uvBufferArray, GLABufferUsage.PerVertex);
            positionBuffer     = new GLABuffer <Vector> (0, 2, null, GLABufferUsage.PerDraw);
            fontPositionBuffer = new GLABuffer <Vector> (0, 3, null, GLABufferUsage.PerDraw);
            foregroundBuffer   = new GLABuffer <Color> (0, 4, null, GLABufferUsage.PerDraw);
            backgroundBuffer   = new GLABuffer <Color> (0, 5, null, GLABufferUsage.PerDraw);
        }
Beispiel #2
0
        public static void Dispose()
        {
            GLABuffer <Vector> .Delete(vertexBuffer, uvBuffer, positionBuffer, fontPositionBuffer);

            GLABuffer <Color> .Delete(foregroundBuffer, backgroundBuffer);
        }
Beispiel #3
0
 public static void Disable()
 {
     GLABuffer <Vector> .DisableVertexAttribute(0, 1, 2, 3, 4, 5);
 }