当我在绘图操作期间使用 StencilBuffer 来渲染目标时,有什么方法可以在调试过程中看到模板缓冲区包含的内容吗?我现在正在搜索几个小时,要么我错过了一些完全明显的东西,要么我找不到查找此表的方法。
XNA 3.1 中的 GraphicsDevice 中有一个属性 DepthStencilBuffer,但它不再存在了。现在我们告诉在创建渲染目标时是否要使用模板缓冲区,是的,但是之后如何访问模板缓冲区,以便我可以查看模板缓冲区中是否有我期望的值?
干杯
卢卡斯
When I'm using StencilBuffer during drawing operations to render targets, is there any way I can see during debugging what the stencil buffer contains? I'm searching for hours now, and either I'm missing something totaly obvious, I can't find a way to look this table up.
There was a property DepthStencilBuffer in the GraphicsDevice in XNA 3.1, but it's not there anymore. Now we tell if we want to use stencil Buffer when we create Render Targets, yes, but how can I access the Stencil Buffer after that, so I can see if I have values in Stencil Buffer that I expect?
cheers
Lucas
发布评论
评论(1)
我通常会对此发表评论,但我还没有足够的代表...
我建议阅读此页面:http://blogs.msdn.com/b/shawnhar/archive/2010/03/26/rendertarget-changes-in-xna-game-studio-4-0.aspx
肖恩Hargreaves 解释说,模板缓冲区的用途微不足道,可以使用产生类似性能的其他技术来完成。
该页面的引用之一:
I would leave a comment for this normally, but I don't have enough rep for it yet...
I would recommend reading through this page: http://blogs.msdn.com/b/shawnhar/archive/2010/03/26/rendertarget-changes-in-xna-game-studio-4-0.aspx
Shawn Hargreaves explains that the uses for Stencil Buffers are insignificant and can be done using other techniques that yield similar performance.
One of the quotes from that page: