Exemple #1
0
        /// <summary>
        /// draws n quads from an index (offset).
        /// n + start can't be greater than the capacity of the atlas
        /// @since v1.0
        /// </summary>
        public void DrawNumberOfQuads(int n, int start)
        {
            if (n == 0)
            {
                return;
            }

            CCDrawManager.BindTexture(Texture);

            if (Dirty)
            {
                CCDrawManager.SetQuadsToBuffer(m_pVertexBuffer, m_pQuads, 0, m_pQuads.count);
                Dirty = false;
            }

            CCDrawManager.DrawQuadsBuffer(m_pVertexBuffer, start, n);
        }
Exemple #2
0
        /// <summary>
        /// draws n quads from an index (offset).
        /// n + start can't be greater than the capacity of the atlas
        /// @since v1.0
        /// </summary>
        public void DrawNumberOfQuads(int n, int start)
        {
            if (n == 0)
            {
                return;
            }

            CCDrawManager.BindTexture(Texture);
            //CCDrawManager.BlendFunc(new ccBlendFunc(ccMacros.CCDefaultSourceBlending, ccMacros.CCDefaultDestinationBlending));

            if (Dirty)
            {
                CCDrawManager.SetQuadsToBuffer(m_pVertexBuffer, m_pQuads, 0, m_pQuads.count);
                Dirty = false;
            }

            CCDrawManager.DrawQuadsBuffer(m_pVertexBuffer, start, n);
        }