Resource Proxies

Published February 22, 2010
Advertisement

Resource Proxies

Following up on my 'resource centric' discussions in the past, I've started the process of updating all of my resource references in Hieroglyph to use a proxy object instead of an integer index. In the past, I always used an integer index for a resource, and then an integer index for each type of view (RenderTargetView, DepthStencilView, ShaderResourceView, and UnorderedAccessView). For complicated effects this means keeping track of quite a few integers, even though there are only 3 or 4 resources being used overall.

So now with the proxy objects, any resource refereces returned are actually a smart pointer to a class that references the resource index, and then depending on the resource bind flag settings it automatically creates default views. Then the client application simply references the proxy, which represents the resource itself - the application no longer needs to keep track of all of the view indices.

The net result is that the sample programs have become significantly easier to follow, and it seems much more intuitive to use the same reference to set a shader resource view and an unordered access view of the same resource. This change also provides a step closer to my rendering notation to being directly usable in code...
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement