gfx
gfx copied to clipboard
Specify clear color value
Could you please overload gfxClearTexture/BackBuffer
with user specified color value.
So the reason there isn't a clear color parameter is because you actually have to supply the clear color upon creating the texture object in D3D12 and then always clear to that same color value (or you'll get some validation warnings).
You can write your own compute shader though to clear to whatever color you want, is that an ok workaround for you?
Providing a pre-determined clear value should also work. However, gfxCreateTexture2D
doesn't seem to have an overload that takes a clear-values. I have several render targets for which I would like to set a different clear-value for each.
Hi, this should be fixed with https://github.com/gboisse/gfx/pull/78.
Closing as fixed.