Fix some engine API to be exposed for C++ scripting

This commit is contained in:
Wojtek Figat
2021-09-04 18:07:08 +02:00
parent 53022ff013
commit e1d9fbb742
11 changed files with 44 additions and 59 deletions

View File

@@ -231,9 +231,9 @@ bool GPUSwapChainDX11::Resize(int32 width, int32 height)
_width = width;
_height = height;
#if PLATFORM_WINDOWS
_memoryUsage = CalculateTextureMemoryUsage(RenderToolsDX::ToPixelFormat(swapChainDesc.BufferDesc.Format), _width, _height, 1) * swapChainDesc.BufferCount;
_memoryUsage = RenderTools::CalculateTextureMemoryUsage(RenderToolsDX::ToPixelFormat(swapChainDesc.BufferDesc.Format), _width, _height, 1) * swapChainDesc.BufferCount;
#else
_memoryUsage = CalculateTextureMemoryUsage(RenderToolsDX::ToPixelFormat(swapChainDesc.Format), _width, _height, 1) * swapChainDesc.BufferCount;
_memoryUsage = RenderTools::CalculateTextureMemoryUsage(RenderToolsDX::ToPixelFormat(swapChainDesc.Format), _width, _height, 1) * swapChainDesc.BufferCount;
#endif
getBackBuffer();

View File

@@ -231,7 +231,7 @@ bool GPUSwapChainDX12::Resize(int32 width, int32 height)
_currentFrameIndex = _swapChain->GetCurrentBackBufferIndex();
_width = width;
_height = height;
_memoryUsage = CalculateTextureMemoryUsage(_format, _width, _height, 1) * swapChainDesc.BufferCount;
_memoryUsage = RenderTools::CalculateTextureMemoryUsage(_format, _width, _height, 1) * swapChainDesc.BufferCount;
getBackBuffer();
#endif