Search Results for

    Show / Hide Table of Contents

    Class DX11GraphicsContext

    Manages all graphical functionalities.

    Inheritance
    object
    GraphicsContext
    DX11GraphicsContext
    Implements
    IGetNativePointers
    Inherited Members
    GraphicsContext.TimestampFrequency
    GraphicsContext.DefaultSampler
    GraphicsContext.ValidationLayer
    GraphicsContext.IsValidationLayerEnabled
    GraphicsContext.Factory
    GraphicsContext.DefaultTextureUploaderSize
    GraphicsContext.DefaultBufferUploaderSize
    GraphicsContext.CreateDevice(ValidationLayer)
    GraphicsContext.UpdateBufferData<T>(Buffer, T[], uint)
    GraphicsContext.UpdateBufferData<T>(Buffer, T[], uint, uint)
    GraphicsContext.UpdateBufferData<T>(Buffer, ref T, uint)
    GraphicsContext.UpdateBufferData(Buffer, nint, uint, uint)
    GraphicsContext.UpdateTextureData<T>(Texture, T[], uint)
    GraphicsContext.UpdateTextureData<T>(Texture, T[], uint, uint)
    GraphicsContext.UpdateTextureData<T>(Texture, ref T, uint)
    GraphicsContext.ShaderCompile(string, string, ShaderStages)
    GraphicsContext.SyncUpcopyQueue()
    GraphicsContext.Dispose()
    GraphicsContext.CreateDefaultSampler()
    Namespace: Evergine.DirectX11
    Assembly: Evergine.DirectX11.dll
    Syntax
    public class DX11GraphicsContext : GraphicsContext, IGetNativePointers

    Constructors

    DX11GraphicsContext()

    Initializes a new instance of the DX11GraphicsContext class.

    Declaration
    public DX11GraphicsContext()

    Fields

    DXDevice

    The DirectX device.

    Declaration
    public ID3D11Device DXDevice
    Field Value
    Type Description
    ID3D11Device

    DXDeviceContext

    The DirectX device's context.

    Declaration
    public ID3D11DeviceContext1 DXDeviceContext
    Field Value
    Type Description
    ID3D11DeviceContext1

    DXFactory

    The DXGI factory.

    Declaration
    public IDXGIFactory2 DXFactory
    Field Value
    Type Description
    IDXGIFactory2

    PipelineStateCache

    The pipeline cache.

    Declaration
    public DX11PipelineStateCache PipelineStateCache
    Field Value
    Type Description
    DX11PipelineStateCache

    Properties

    AvailablePointerKeys

    Gets a list of all available keys to obtain native pointers.

    Declaration
    public override IEnumerable<string> AvailablePointerKeys { get; }
    Property Value
    Type Description
    IEnumerable<string>
    Overrides
    GraphicsContext.AvailablePointerKeys

    BackendType

    Gets the backend type (DirectX, OpenGL, etc.)

    Declaration
    public override GraphicsBackend BackendType { get; }
    Property Value
    Type Description
    GraphicsBackend
    Overrides
    GraphicsContext.BackendType

    Capabilities

    Gets the capabilities of this graphics context.

    Declaration
    public override GraphicsContextCapabilities Capabilities { get; }
    Property Value
    Type Description
    GraphicsContextCapabilities
    Overrides
    GraphicsContext.Capabilities

    DXDevice1

    Gets the DirectX Device.

    Declaration
    public ID3D11Device1 DXDevice1 { get; }
    Property Value
    Type Description
    ID3D11Device1

    DXDevice2

    Gets the DirectX Device2.

    Declaration
    public ID3D11Device2 DXDevice2 { get; }
    Property Value
    Type Description
    ID3D11Device2

    DXDevice3

    Gets the DirectX device.

    Declaration
    public ID3D11Device3 DXDevice3 { get; }
    Property Value
    Type Description
    ID3D11Device3

    NativeContextPointer

    Gets the native pointer of the DeviceContext.

    Declaration
    public nint NativeContextPointer { get; }
    Property Value
    Type Description
    nint

    NativeDevicePointer

    Gets the native device pointer.

    Declaration
    public override nint NativeDevicePointer { get; }
    Property Value
    Type Description
    nint
    Overrides
    GraphicsContext.NativeDevicePointer

    SupportedGraphicProfile

    Gets the supported graphics profile.

    Declaration
    public GraphicsProfile SupportedGraphicProfile { get; }
    Property Value
    Type Description
    GraphicsProfile

    Methods

    CreateDeviceInternal()

    Initializes the graphics context to be used in a compute shader.

    Declaration
    public override void CreateDeviceInternal()
    Overrides
    GraphicsContext.CreateDeviceInternal()

    CreateSwapChain(SwapChainDescription)

    Initializes the swap chain.

    Declaration
    public override SwapChain CreateSwapChain(SwapChainDescription description)
    Parameters
    Type Name Description
    SwapChainDescription description

    The swap chain descriptor.

    Returns
    Type Description
    SwapChain

    Created Swap chain.

    Overrides
    GraphicsContext.CreateSwapChain(SwapChainDescription)

    Dispose(bool)

    Releases unmanaged and optionally managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Overrides
    GraphicsContext.Dispose(bool)

    GenerateTextureMipmapping(Texture)

    Generates mipmapping texture levels.

    Declaration
    public override bool GenerateTextureMipmapping(Texture texture)
    Parameters
    Type Name Description
    Texture texture

    The texture for which mipmapping is generated.

    Returns
    Type Description
    bool

    True if the mipmapping has been generated.

    Overrides
    GraphicsContext.GenerateTextureMipmapping(Texture)

    GetNativePointer(string, out nint)

    Obtains a native pointer for this graphics context using the given key.

    Declaration
    public override bool GetNativePointer(string pointerKey, out nint nativePointer)
    Parameters
    Type Name Description
    string pointerKey

    The pointer key.

    nint nativePointer

    The native pointer.

    Returns
    Type Description
    bool

    True if there is an available pointer with this key.

    Overrides
    GraphicsContext.GetNativePointer(string, out nint)

    InternalUpdateBufferData(Buffer, nint, uint, uint)

    Fills the buffer from a pointer.

    Declaration
    protected override void InternalUpdateBufferData(Buffer buffer, nint source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0)
    Parameters
    Type Name Description
    Buffer buffer

    Buffer instance.

    nint source

    The data pointer.

    uint sourceSizeInBytes

    The size in bytes.

    uint destinationOffsetInBytes

    The offset in bytes.

    Overrides
    GraphicsContext.InternalUpdateBufferData(Buffer, nint, uint, uint)

    MapMemory(GraphicsResource, MapMode, uint)

    Maps a Buffer or Texture to a CPU-accessible data region.

    Declaration
    public override MappedResource MapMemory(GraphicsResource resource, MapMode mode, uint subResource = 0)
    Parameters
    Type Name Description
    GraphicsResource resource

    The graphics resource to map.

    MapMode mode

    The MapMode used to map the resource.

    uint subResource

    The subresource to map. Subresources are indexed first by mip slice and then by array layer. Applies only to Textures.

    Returns
    Type Description
    MappedResource

    A MappedResource structure describing the mapped data region.

    Overrides
    GraphicsContext.MapMemory(GraphicsResource, MapMode, uint)

    ShaderCompile(string, string, ShaderStages, CompilerParameters)

    Converts the shader source into bytecode.

    Declaration
    public override CompilationResult ShaderCompile(string shaderSource, string entryPoint, ShaderStages stage, CompilerParameters parameters)
    Parameters
    Type Name Description
    string shaderSource

    The shader source text.

    string entryPoint

    The entry point function name.

    ShaderStages stage

    The shader stage, ShaderStages.

    CompilerParameters parameters

    The compiler parameters.

    Returns
    Type Description
    CompilationResult

    The shader bytecode.

    Overrides
    GraphicsContext.ShaderCompile(string, string, ShaderStages, CompilerParameters)

    UnmapMemory(GraphicsResource, uint)

    Invalidates a previously-mapped data region for the given Buffer or Texture.

    Declaration
    public override void UnmapMemory(GraphicsResource resource, uint subResource = 0)
    Parameters
    Type Name Description
    GraphicsResource resource

    The graphics resource to unmap.

    uint subResource

    The subresource to unmap. Subresources are indexed first by mip slice and then by array layer. Only for Textures.

    Overrides
    GraphicsContext.UnmapMemory(GraphicsResource, uint)

    UpdateTextureData(Texture, nint, uint, uint)

    Fills the buffer from a pointer.

    Declaration
    public override void UpdateTextureData(Texture texture, nint source, uint sourceSizeInBytes, uint subResource = 0)
    Parameters
    Type Name Description
    Texture texture

    Texture instance.

    nint source

    The data pointer.

    uint sourceSizeInBytes

    The size in bytes.

    uint subResource

    The sub-resource index.

    Overrides
    GraphicsContext.UpdateTextureData(Texture, nint, uint, uint)

    Implements

    IGetNativePointers

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX