public SpriteBatcher(GLGraphics glGraphics, GLProgramParameter glProgramParam, int maxSprites)
        {
            m_NumVertices = maxSprites * 4;

            this.m_GlProgramParam     = glProgramParam;
            this.m_VerticesVec        = new Vector3[m_NumVertices];
            this.m_TextureCoordinates = new TextureCoord[m_NumVertices];
            this.m_Vertices           = new Vertices();
            this.m_BufferIndex        = 0;
            this.m_NumSprites         = 0;

            ushort[] indices = new ushort[maxSprites * 6];
            int      len     = indices.Length;
            ushort   j       = 0;

            for (int i = 0; i < len; i += 6, j += 4)
            {
                indices[i + 0] = (ushort)(j + 0);
                indices[i + 1] = (ushort)(j + 1);
                indices[i + 2] = (ushort)(j + 2);
                indices[i + 3] = (ushort)(j + 2);
                indices[i + 4] = (ushort)(j + 3);
                indices[i + 5] = (ushort)(j + 0);
            }

            m_Vertices.SetProgram(glProgramParam);
            m_Vertices.SetIndecies(indices);

            for (int i = 0; i < m_NumVertices; i++)
            {
                m_VerticesVec[i]        = new Vector3();
                m_TextureCoordinates[i] = new TextureCoord();
            }
        }
 public void SetProgram(GLProgramParameter programParam)
 {
     this.m_ProgramParam = programParam;
 }