Class GPUDevice
Graphics device object for rendering on GPU.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class GPUDevice : Object
Constructors
GPUDevice()
Properties
Adapter
Gets the adapter device.
Declaration
[Unmanaged]
public GPUAdapter Adapter { get; }
Property Value
FlaxEngine.GPUAdapter
|
DefaultBlackTexture
Gets the default solid black texture.
Declaration
[Unmanaged]
public GPUTexture DefaultBlackTexture { get; }
Property Value
GPUTexture
|
DefaultMaterial
Gets the default material.
Declaration
[Unmanaged]
public MaterialBase DefaultMaterial { get; }
Property Value
MaterialBase
|
DefaultWhiteTexture
Gets the default solid white texture.
Declaration
[Unmanaged]
public GPUTexture DefaultWhiteTexture { get; }
Property Value
GPUTexture
|
FeatureLevel
Gets device feature level type.
Declaration
[Unmanaged]
public FeatureLevel FeatureLevel { get; }
Property Value
FeatureLevel
|
Instance
The singleton instance of the graphics device.
Declaration
[Unmanaged]
public static GPUDevice Instance { get; }
Property Value
GPUDevice
|
IsDebugToolAttached
Indicates that debug tool is profiling device (eg. RenderDoc).
Declaration
[Unmanaged]
public bool IsDebugToolAttached { get; }
Property Value
System.Boolean
|
IsRendering
Returns true if device is during rendering state, otherwise false.
Declaration
[Unmanaged]
public bool IsRendering { get; }
Property Value
System.Boolean
|
Limits
MainContext
Gets the main GPU context.
Declaration
[Unmanaged]
public GPUContext MainContext { get; }
Property Value
GPUContext
|
MemoryUsage
Gets the amount of memory usage by all the GPU resources (in bytes).
Declaration
[Unmanaged]
public ulong MemoryUsage { get; }
Property Value
System.UInt64
|
NativePtr
Gets the native pointer to the underlying graphics device. It's a low-level platform-specific handle.
Declaration
[Unmanaged]
public IntPtr NativePtr { get; }
Property Value
System.IntPtr
|
QuadShader
Quad rendering shader
Declaration
[Unmanaged]
public GPUShader QuadShader { get; }
Property Value
GPUShader
|
RendererType
Gets the device renderer type.
Declaration
[Unmanaged]
public RendererType RendererType { get; }
Property Value
RendererType
|
Resources
Gets the list with all active GPU resources.
Declaration
[Unmanaged]
public GPUResource[] Resources { get; }
Property Value
GPUResource[]
|
ShaderProfile
Gets device shader profile type.
Declaration
[Unmanaged]
public ShaderProfile ShaderProfile { get; }
Property Value
ShaderProfile
|
TotalGraphicsMemory
The total amount of graphics memory in bytes.
Declaration
[Unmanaged]
public ulong TotalGraphicsMemory { get; }
Property Value
System.UInt64
|
VideoOutputModes
The available video output modes.
Declaration
[Unmanaged]
public GPUDevice.VideoOutputMode[] VideoOutputModes { get; }
Property Value
GPUDevice.VideoOutputMode[]
|
Methods
CreateBuffer(String)
Creates the buffer.
Declaration
[Unmanaged]
public GPUBuffer CreateBuffer(string name = null)
Parameters
System.String
name
The resource name. |
Returns
GPUBuffer
The buffer. |
CreateSampler()
Creates the texture sampler.
Declaration
[Unmanaged]
public GPUSampler CreateSampler()
Returns
GPUSampler
The sampler. |
CreateTexture(String)
Creates the texture.
Declaration
[Unmanaged]
public GPUTexture CreateTexture(string name = null)
Parameters
System.String
name
The resource name. |
Returns
GPUTexture
The texture. |
GetFormatFeatures(PixelFormat)
Gets the supported features for the specified format (index is the pixel format value).
Declaration
[Unmanaged]
public FormatFeatures GetFormatFeatures(PixelFormat format)
Parameters
PixelFormat
format
The format. |
Returns
FormatFeatures
The format features flags. |