Closed smeunier-amd closed 11 months ago
Instead of the common pattern :
gfxDestroyTexture(gfx_, accumulationDIBuffer); accumulationDIBuffer = {};
Just doing :
gfxDestroyTexture(gfx_, accumulationDIBuffer);
With :
GfxResult gfxDestroyTexture(GfxContext context, GfxTexture& texture) { GfxInternal *gfx = GfxInternal::GetGfx(context); if(!gfx) return kGfxResult_InvalidParameter; GfxResult result = gfx->destroyTexture(texture); texture = {}; // maybe test result ? maybe reset in destroyTexture ? return result; }
Yep, that's typical of C-style APIs I guess, bit annoying I agree.
Instead of the common pattern :
Just doing :
With :