Search Results for

    Show / Hide Table of Contents

    Class GPUDevice

    Graphics device object for rendering on GPU.

    Inheritance
    System.Object
    Object
    GPUDevice
    Inherited Members
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public sealed class GPUDevice : Object

    Constructors

    GPUDevice()

    Initializes a new instance of the GPUDevice.

    Declaration
    public 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

    The GPU limits.

    Declaration
    [Unmanaged]
    public GPULimits Limits { get; }
    Property Value
    GPULimits

    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.

    CreateVertexLayout(VertexElement[], Boolean)

    Creates the vertex buffer layout.

    Declaration
    [Unmanaged]
    public GPUVertexLayout CreateVertexLayout(VertexElement[] elements, bool explicitOffsets = false)
    Parameters
    VertexElement[] elements

    System.Boolean explicitOffsets

    Returns
    GPUVertexLayout

    The vertex buffer layout.

    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.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat