diff --git a/src/State.cpp b/src/State.cpp index 1acb9db8..f5d7828f 100644 --- a/src/State.cpp +++ b/src/State.cpp @@ -328,8 +328,10 @@ void State::SetupResources() permutationCB = new ConstantBuffer(ConstantBufferDesc()); sharedDataCB = new ConstantBuffer(ConstantBufferDesc()); - auto [_, size] = GetFeatureBufferData(); + + auto [data, size] = GetFeatureBufferData(); featureDataCB = new ConstantBuffer(ConstantBufferDesc((uint32_t)size)); + delete[] data; // Grab main texture to get resolution // VR cannot use viewport->screenWidth/Height as it's the desktop preview window's resolution and not HMD