Open tyanmahou opened 5 years ago
主にマスク処理などに使用するため、StencilStateを使用したいです。
また、提案ですが ScopedRenderStates2Dのようなスコープ制御で簡単にマスク処理ができると便利かもしれません。
以下のようなことがしたいイメージです
ScopedStencilMask::ScopedStencilMask(std::function<void()> base, s3d::StencilFunc stencilFunc, s3d::uint8 stencilValue): m_oldStencilState(Graphics2D::GetStencilState()), m_oldStencilValue(Graphics2D::GetStencilValue()) { Graphics2D::SetStencilState(StencilState::Replace); Graphics2D::SetStencilValue(stencilValue); base(); Graphics2D::SetStencilState(StencilState::Test(stencilFunc)); }
2D 描画でのステンシル実装は直近で予定はありません。 v0.4.1 からの ・マルチテクスチャ ・RenderTexture ・カスタムピクセルシェーダ で代替できないか検討してください。 どうしてもできない / 効率的にできない場合はまたご報告ください。
主にマスク処理などに使用するため、StencilStateを使用したいです。
また、提案ですが ScopedRenderStates2Dのようなスコープ制御で簡単にマスク処理ができると便利かもしれません。
以下のようなことがしたいイメージです