Cocos2d-x移植WP8时间CCScrollView问题
cocos2d-x 2.2中的CCScrollView和CCTableView存在bug。导致区域裁剪错误
我是这样解决的。 在CCEGLView::setScissorInPoints里。依据不同旋转方向,设置不同參数
void CCEGLView::setScissorInPoints(float x , float y , float w , float h) { switch(m_orientation) { case DisplayOrientations::Landscape: glScissor((GLint)(y * m_fScaleY + m_obViewPortRect.origin.y), (GLint)(m_obViewPortRect.size.width - ((x + w) * m_fScaleX + m_obViewPortRect.origin.x)), (GLsizei)(h * m_fScaleY), (GLsizei)(w * m_fScaleX)); break; case DisplayOrientations::LandscapeFlipped: glScissor((GLint)(y * m_fScaleY + m_obViewPortRect.origin.y), (GLint)(x * m_fScaleX + m_obViewPortRect.origin.x), (GLsizei)(h * m_fScaleY), (GLsizei)(w * m_fScaleX)); break; default: glScissor((GLint)(x * m_fScaleX + m_obViewPortRect.origin.x), (GLint)(y * m_fScaleY + m_obViewPortRect.origin.y), (GLsizei)(w * m_fScaleX), (GLsizei)(h * m_fScaleY)); } }
版权声明:本文博客原创文章,博客,未经同意,不得转载。