Exemple #1
0
        public override void Draw()
        {
            Debug.Assert(m_pobBatchNode == null);

            CCDrawManager.BlendFunc(m_sBlendFunc);
            CCDrawManager.BindTexture(Texture);
            CCDrawManager.DrawQuad(ref m_sQuad);
        }
        public override void Draw()
        {
            Debug.Assert(m_pobBatchNode == null);

            CCDrawManager.BlendFunc(m_sBlendFunc);
            CCDrawManager.BindTexture(Texture);
            CCDrawManager.DrawQuad(ref m_sQuad);

            /*
             * var sb = DrawManager.spriteBatch;
             * sb.Begin(SpriteSortMode.Deferred, null, null, null, null, null, DrawManager.basicEffect.World);
             * sb.Draw(Texture.getTexture2D(), new Vector2(0, 0), new Color(this.Color.r, this.Color.g, this.Color.b, Opacity));
             * sb.End();
             */
        }
        public override void Draw()
        {
            CCDrawManager.BlendFunc(CCBlendFunc.AlphaBlend);
            CCDrawManager.BindTexture(Texture);
            CCDrawManager.DrawQuad(ref m_sQuad);

            //    /*
            //    CC_NODE_DRAW_SETUP();

            //    ccGLEnableVertexAttribs(kCCVertexAttribFlag_PosColorTex);
            //    ccGLBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
            //    getShaderProgram()->setUniformForModelViewProjectionMatrix();

            //    glActiveTexture(GL_TEXTURE0);
            //    glBindTexture( GL_TEXTURE_2D, getTexture()->getName());
            //    glUniform1i(m_uTextureLocation, 0);

            //    glActiveTexture(GL_TEXTURE1);
            //    glBindTexture( GL_TEXTURE_2D, m_pMaskTexture->getName() );
            //    glUniform1i(m_uMaskLocation, 1);

            //#define kQuadSize sizeof(m_sQuad.bl)
            //    long offset = (long)&m_sQuad;

            //    // vertex
            //    int diff = offsetof( ccV3F_C4B_T2F, vertices);
            //    glVertexAttribPointer(kCCVertexAttrib_Position, 3, GL_FLOAT, GL_FALSE, kQuadSize, (void*) (offset + diff));

            //    // texCoods
            //    diff = offsetof( ccV3F_C4B_T2F, texCoords);
            //    glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, kQuadSize, (void*)(offset + diff));

            //    // color
            //    diff = offsetof( ccV3F_C4B_T2F, colors);
            //    glVertexAttribPointer(kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (void*)(offset + diff));

            //    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
            //    glActiveTexture(GL_TEXTURE0);
            //    */
        }
 public override void Draw()
 {
     CCDrawManager.BlendFunc(CCBlendFunc.AlphaBlend);
     CCDrawManager.BindTexture(Texture);
     CCDrawManager.DrawQuad(ref m_sQuad);
 }