Tweaks
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user