mirror of
https://github.com/u0u0/Cocos2d-Lua-Community.git
synced 2026-07-01 03:04:42 +08:00
修正在某些情况下OpenGL矩形裁剪闪屏的bug
This commit is contained in:
@@ -374,6 +374,7 @@ void CommandBufferGL::drawElements(PrimitiveType primitiveType, IndexFormat inde
|
||||
|
||||
void CommandBufferGL::endRenderPass()
|
||||
{
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
void CommandBufferGL::endFrame()
|
||||
@@ -599,21 +600,14 @@ void CommandBufferGL::setLineWidth(float lineWidth)
|
||||
glLineWidth(lineWidth);
|
||||
else
|
||||
glLineWidth(1.0f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CommandBufferGL::setScissorRect(bool isEnabled, float x, float y, float width, float height)
|
||||
{
|
||||
if(isEnabled)
|
||||
{
|
||||
if (isEnabled) {
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glScissor(x, y, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
}
|
||||
|
||||
void CommandBufferGL::captureScreen(std::function<void(const unsigned char*, int, int)> callback)
|
||||
|
||||
Reference in New Issue
Block a user