public void Transform() { CCDrawManager.MultMatrix(NodeToParentTransform(), m_fVertexZ); // XXX: Expensive calls. Camera should be integrated into the cached affine matrix if (m_pCamera != null && !(m_pGrid != null && m_pGrid.Active)) { bool translate = (m_obAnchorPointInPoints.X != 0.0f || m_obAnchorPointInPoints.Y != 0.0f); if (translate) { CCDrawManager.Translate(m_obAnchorPointInPoints.X, m_obAnchorPointInPoints.Y, 0); } m_pCamera.Locate(); if (translate) { CCDrawManager.Translate(-m_obAnchorPointInPoints.X, -m_obAnchorPointInPoints.Y, 0); } } }
public virtual void AfterDraw(CCNode target) { m_pGrabber.AfterRender(m_pTexture); CCDirector.SharedDirector.Projection = m_directorProjection; if (target.Camera.Dirty) { CCPoint offset = target.AnchorPointInPoints; CCDrawManager.Translate(offset.X, offset.Y, 0); target.Camera.Locate(); CCDrawManager.Translate(-offset.X, -offset.Y, 0); } CCDrawManager.BindTexture(m_pTexture); //Blit(); // restore projection for default FBO .fixed bug #543 #544 //TODO: CCDirector::sharedDirector()->setProjection(CCDirector::sharedDirector()->getProjection()); //TODO: CCDirector::sharedDirector()->applyOrientation(); }