This commit is contained in:
Wojtek Figat
2021-06-11 16:49:30 +02:00
parent 8f78ccf414
commit 7c9e170a40
2 changed files with 13 additions and 9 deletions

View File

@@ -298,6 +298,11 @@ bool GPUDevice::LoadContent()
return false;
}
bool GPUDevice::CanDraw()
{
return true;
}
void GPUDevice::preDispose()
{
RenderTargetPool::Flush();
@@ -449,6 +454,11 @@ void GPUDevice::Dispose()
VideoOutputModes.Resize(0);
}
uint64 GPUDevice::GetMemoryUsage() const
{
return Resources.GetMemoryUsage();
}
MaterialBase* GPUDevice::GetDefaultMaterial() const
{
return _res->DefaultMaterial;

View File

@@ -224,10 +224,7 @@ public:
/// <summary>
/// Gets the amount of memory usage by all the GPU resources (in bytes).
/// </summary>
API_PROPERTY() FORCE_INLINE uint64 GetMemoryUsage() const
{
return Resources.GetMemoryUsage();
}
API_PROPERTY() uint64 GetMemoryUsage() const;
/// <summary>
/// Gets the default material.
@@ -287,10 +284,7 @@ public:
/// Checks if GPU can render frame now (all data is ready), otherwise will skip frame rendering.
/// </summary>
/// <returns>True if skip rendering, otherwise false.</returns>
virtual bool CanDraw()
{
return true;
}
virtual bool CanDraw();
/// <summary>
/// Call frame rendering and process data using GPU
@@ -389,7 +383,7 @@ public:
/// <summary>
/// Utility structure to safety graphics device locking.
/// </summary>
struct GPUDeviceLock : NonCopyable
struct FLAXENGINE_API GPUDeviceLock : NonCopyable
{
const GPUDevice* Device;