Ejemplo n.º 1
0
        public void DrawQuad(int texture, GLVertex[] vertices)
        {
            texture = getTexture(texture);
            _graphics.BindTexture2D(texture);

            _graphics.BufferData(vertices, GLVertex.Size, BufferType.ArrayBuffer);
            _graphics.InitPointers(GLVertex.Size);

            _graphics.BufferData(_quadIndices, sizeof(short), BufferType.ElementArrayBuffer);
            _graphics.SetShaderAppVars();

            _graphics.DrawElements(PrimitiveMode.Triangles, 6, _quadIndices);
        }