public override void Draw() { // GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY // GL_TEXTURE_2D m_textureAtlas.DrawQuads(); // [textureAtlas drawNumberOfQuads:3]; }
public override void Draw() { if (TextureAtlas.TotalQuads == 0) { return; } CCDrawManager.BlendFunc(m_tBlendFunc); TextureAtlas.DrawQuads(); }
public override void Draw() { // Optimization: Fast Dispatch if (m_pobTextureAtlas.TotalQuads == 0) { return; } if (m_pChildren != null && m_pChildren.count > 0) { CCNode[] elements = m_pChildren.Elements; for (int i = 0, count = m_pChildren.count; i < count; i++) { ((CCSprite)elements[i]).UpdateTransform(); } } CCDrawManager.BlendFunc(m_blendFunc); m_pobTextureAtlas.DrawQuads(); }
public override void Draw() { //CC_PROFILER_STOP("CCParticleBatchNode - draw"); if (TextureAtlas.TotalQuads == 0) { return; } for (int i = 0; i < m_pChildren.count; i++) { //((CCParticleSystem) m_pChildren.Elements[i]).updateQuadsWithParticles(); } //CC_NODE_DRAW_SETUP(); //ccGLBlendFunc( m_tBlendFunc.src, m_tBlendFunc.dst ); CCDrawManager.BlendFunc(m_tBlendFunc); TextureAtlas.DrawQuads(); //CC_PROFILER_STOP("CCParticleBatchNode - draw"); }
void _spAtlasPage_createTexture(AtlasPage self, string path) { CCTexture2D texture = CCTextureCache.SharedTextureCache.AddImage(path); CCTextureAtlas textureAtlas = new CCTextureAtlas(); textureAtlas.InitWithTexture(texture, 128); textureAtlas.DrawQuads(); //retain(); self.rendererObject = textureAtlas; self.width = texture.PixelsWide; self.height = texture.PixelsHigh; }