Why use references to modify the value of a variable?

7 hours ago 3
ARTICLE AD BOX

Please see line 33~36:

image

Why use references to modify the value of a variable? (line 33~36).

Here is my code, I think they are the same.

D3D12_RESOURCE_BARRIER resourceBarrier = { }; resourceBarrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE; resourceBarrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION; resourceBarrier.Transition.pResource = ; resourceBarrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COMMON; resourceBarrier.Transition.StateAfter = D3D12_RESOURCE_STATE_DEPTH_WRITE; resourceBarrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
Read Entire Article