Search Results for

    Show / Hide Table of Contents

    Class VKGraphicsContext

    Graphics context on Vulkan.

    Inheritance
    object
    GraphicsContext
    VKGraphicsContext
    Implements
    IDisposable
    IGetNativePointers
    Inherited Members
    GraphicsContext.TimestampFrequency
    GraphicsContext.DefaultSampler
    GraphicsContext.ValidationLayer
    GraphicsContext.IsValidationLayerEnabled
    GraphicsContext.Factory
    GraphicsContext.AvailablePointerKeys
    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, IntPtr, 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.Dispose()
    GraphicsContext.CreateDefaultSampler()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Vulkan
    Assembly: Evergine.Vulkan.dll
    Syntax
    public class VKGraphicsContext : GraphicsContext, IDisposable, IGetNativePointers

    Constructors

    VKGraphicsContext()

    Initializes a new instance of the VKGraphicsContext class.

    Declaration
    public VKGraphicsContext()

    VKGraphicsContext(IEnumerable<string>, IEnumerable<string>)

    Initializes a new instance of the VKGraphicsContext class.

    Declaration
    public VKGraphicsContext(IEnumerable<string> deviceExtensionsToEnable, IEnumerable<string> instanceExtensionsToEnable)
    Parameters
    Type Name Description
    IEnumerable<string> deviceExtensionsToEnable

    Set of device extensions to be enabled for this application.

    IEnumerable<string> instanceExtensionsToEnable

    Set of device instance extensions to be enabled for this application.

    Fields

    DeviceExtensionsToEnable

    Set of device extensions to be enabled for this application.

    Declaration
    public readonly List<string> DeviceExtensionsToEnable
    Field Value
    Type Description
    List<string>
    Remarks

    Must be set before create device.

    InstanceExtensionsToEnable

    Set of device instance extensions to be enabled for this application.

    Declaration
    public readonly List<string> InstanceExtensionsToEnable
    Field Value
    Type Description
    List<string>
    Remarks

    Must be set before create device.

    VkDevice

    Vulkan device object.

    Declaration
    public VkDevice VkDevice
    Field Value
    Type Description
    VkDevice

    VkInstance

    Vulkan instance object.

    Declaration
    public VkInstance VkInstance
    Field Value
    Type Description
    VkInstance

    VkPhysicalDevice

    Vulkan physical device object.

    Declaration
    public VkPhysicalDevice VkPhysicalDevice
    Field Value
    Type Description
    VkPhysicalDevice

    VkPhysicalDeviceFeatures2

    Vulkan physical device features.

    Declaration
    public VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2
    Field Value
    Type Description
    VkPhysicalDeviceFeatures2

    VkPhysicalDeviceMemoryProperties

    Vulkan physical device memory properties.

    Declaration
    public VkPhysicalDeviceMemoryProperties VkPhysicalDeviceMemoryProperties
    Field Value
    Type Description
    VkPhysicalDeviceMemoryProperties

    VkPhysicalDeviceProperties2

    Vulkan physical device properties.

    Declaration
    public VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2
    Field Value
    Type Description
    VkPhysicalDeviceProperties2

    copyCommandBuffer

    The vulkan command buffer used to copy commands.

    Declaration
    public VkCommandBuffer copyCommandBuffer
    Field Value
    Type Description
    VkCommandBuffer

    disposed

    Whether the object is disposed.

    Declaration
    protected bool disposed
    Field Value
    Type Description
    bool

    features_1_1

    Structure describing the Vulkan 1.1 features that can be supported by an implementation.

    Declaration
    public VkPhysicalDeviceVulkan11Features features_1_1
    Field Value
    Type Description
    VkPhysicalDeviceVulkan11Features

    features_1_2

    Structure describing the Vulkan 1.2 features that can be supported by an implementation.

    Declaration
    public VkPhysicalDeviceVulkan12Features features_1_2
    Field Value
    Type Description
    VkPhysicalDeviceVulkan12Features

    Properties

    BackendType

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

    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

    NativeDevicePointer

    Gets the native device pointer.

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

    Methods

    CreateDeviceInternal()

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

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

    CreateSwapChain(SwapChainDescription)

    Initialize the swapchain.

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

    The swapchain descriptor.

    Returns
    Type Description
    SwapChain

    Created Swapchain.

    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)

    Generate mipmapping texture levels.

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

    The texture to generate mipmapping.

    Returns
    Type Description
    bool

    True if the mipmapping has been generated.

    Overrides
    GraphicsContext.GenerateTextureMipmapping(Texture)

    GetNativePointer(string, out IntPtr)

    Obtain a native pointer of this graphics context using the given key.

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

    The pointer key.

    IntPtr nativePointer

    The native pointer.

    Returns
    Type Description
    bool

    True if there are an available pointer with this key.

    Overrides
    GraphicsContext.GetNativePointer(string, out IntPtr)

    InternalUpdateBufferData(Buffer, IntPtr, uint, uint)

    Fill the buffer from a pointer.

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

    Buffer instance.

    IntPtr source

    The data pointer.

    uint sourceSizeInBytes

    The size in bytes.

    uint destinationOffsetInBytes

    The offset in bytes.

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

    MapMemory(GraphicsResource, MapMode, uint)

    Maps a Buffer or Texture into 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. Only for 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 entrypoint function name.

    ShaderStages stage

    The shader stage, ShaderStages.

    CompilerParameters parameters

    The compiler parameters.

    Returns
    Type Description
    CompilationResult

    The shader bytecodes.

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

    SyncUpcopyQueue()

    Sync the current buffer data in the copyQueue. Internal function used in the uploadbuffer strategy.

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

    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 map.

    uint subResource

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

    Overrides
    GraphicsContext.UnmapMemory(GraphicsResource, uint)

    UpdateTextureData(Texture, IntPtr, uint, uint)

    Fill the buffer from a pointer.

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

    Texture instance.

    IntPtr source

    The data pointer.

    uint sourceSizeInBytes

    The size in bytes.

    uint subResource

    The subResource index.

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

    Implements

    IDisposable
    IGetNativePointers

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX