Skip to content

Commit

Permalink
Fix #2069 liv2d compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Aug 4, 2024
1 parent 3a46201 commit 636a42a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void CubismCommandBuffer_Cocos2dx::SetColorBuffer(backend::TextureBackend* color
{
rt = GetCocos2dRenderer()->getOffscreenRenderTarget();
rt->setColorAttachment(colorBuffer);
rt->setTargetFlags(RenderTargetFlag::COLOR);
//rt->setTargetFlags(RenderTargetFlag::COLOR);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ void CubismRendererProfile_Cocos2dx::Save()
// _lastRenderTargetFlag = GetCocos2dRenderer()->getRenderTargetFlag();
// _lastColorBuffer = nullptr; // unused
_lastRenderTarget = GetCocos2dRenderer()->getRenderTarget();
_lastRenderTargetFlag = _lastRenderTarget->getTargetFlags();
//_lastRenderTargetFlag = _lastRenderTarget->getTargetFlags();
_lastColorBuffer = _lastRenderTarget->_color[0].texture;
_lastDepthBuffer = _lastRenderTarget->_depth.texture;
_lastStencilBuffer = _lastRenderTarget->_stencil.texture;
Expand Down Expand Up @@ -684,7 +684,7 @@ void CubismRendererProfile_Cocos2dx::Restore()
restoringRT->setColorAttachment(_lastColorBuffer);
restoringRT->setDepthAttachment(_lastDepthBuffer);
restoringRT->setStencilAttachment(_lastStencilBuffer);
restoringRT->setTargetFlags(_lastRenderTargetFlag);
// restoringRT->setTargetFlags(_lastRenderTargetFlag);
cmd->func = [=]() -> void {
GetCocos2dRenderer()->setRenderTarget(restoringRT);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class CubismRendererProfile_Cocos2dx
backend::TextureBackend* _lastColorBuffer; ///< モデル描画直前のフレームバッファ
backend::TextureBackend* _lastDepthBuffer;
backend::TextureBackend* _lastStencilBuffer;
ax::RenderTargetFlag _lastRenderTargetFlag;
//ax::RenderTargetFlag _lastRenderTargetFlag;
backend::RenderTarget* _lastRenderTarget;
csmRectF _lastViewport; ///< モデル描画直前のビューポート
};
Expand Down

2 comments on commit 636a42a

@paulocoutinhox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not remove the lines, instead of leave code not used commented?

@halx99
Copy link
Collaborator Author

@halx99 halx99 commented on 636a42a Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just fix the compile error and leave the comment, if there is render issue in the future, we can address it quickly

Please sign in to comment.