Table of Contents

Class ResourceFactory

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

A device object responsible for the creation of graphics resources.

public abstract class ResourceFactory
Inheritance
ResourceFactory
Derived
Inherited Members
Extension Methods

Constructors

ResourceFactory(GraphicsDeviceFeatures)

protected ResourceFactory(GraphicsDeviceFeatures features)

Parameters

features GraphicsDeviceFeatures

Properties

BackendType

Gets the GraphicsBackend of this instance.

public abstract GraphicsBackend BackendType { get; }

Property Value

GraphicsBackend

Features

Gets the GraphicsDeviceFeatures this instance was created with.

public GraphicsDeviceFeatures Features { get; }

Property Value

GraphicsDeviceFeatures

Methods

CreateBuffer(BufferDescription)

Creates a new DeviceBuffer.

public DeviceBuffer CreateBuffer(BufferDescription description)

Parameters

description BufferDescription

The desired properties of the created object.

Returns

DeviceBuffer

A new DeviceBuffer.

CreateBuffer(ref BufferDescription)

Creates a new DeviceBuffer.

public DeviceBuffer CreateBuffer(ref BufferDescription description)

Parameters

description BufferDescription

The desired properties of the created object.

Returns

DeviceBuffer

A new DeviceBuffer.

CreateBufferCore(ref BufferDescription)

protected abstract DeviceBuffer CreateBufferCore(ref BufferDescription description)

Parameters

description BufferDescription

Returns

DeviceBuffer

CreateCommandList()

Creates a new CommandList.

public CommandList CreateCommandList()

Returns

CommandList

A new CommandList.

CreateCommandList(CommandListDescription)

Creates a new CommandList.

public CommandList CreateCommandList(CommandListDescription description)

Parameters

description CommandListDescription

The desired properties of the created object.

Returns

CommandList

A new CommandList.

CreateCommandList(ref CommandListDescription)

Creates a new CommandList.

public abstract CommandList CreateCommandList(ref CommandListDescription description)

Parameters

description CommandListDescription

The desired properties of the created object.

Returns

CommandList

A new CommandList.

CreateComputePipeline(ComputePipelineDescription)

Creates a new compute Pipeline object.

public Pipeline CreateComputePipeline(ComputePipelineDescription description)

Parameters

description ComputePipelineDescription

The desirede properties of the created object.

Returns

Pipeline

A new Pipeline which, when bound to a CommandList, is used to dispatch compute commands.

CreateComputePipeline(ref ComputePipelineDescription)

Creates a new compute Pipeline object.

public abstract Pipeline CreateComputePipeline(ref ComputePipelineDescription description)

Parameters

description ComputePipelineDescription

The desirede properties of the created object.

Returns

Pipeline

A new Pipeline which, when bound to a CommandList, is used to dispatch compute commands.

CreateFence(bool)

Creates a new Fence in the given state.

public abstract Fence CreateFence(bool signaled)

Parameters

signaled bool

A value indicating whether the Fence should be in the signaled state when created.

Returns

Fence

A new Fence.

CreateFramebuffer(FramebufferDescription)

Creates a new Framebuffer.

public Framebuffer CreateFramebuffer(FramebufferDescription description)

Parameters

description FramebufferDescription

The desired properties of the created object.

Returns

Framebuffer

A new Framebuffer.

CreateFramebuffer(ref FramebufferDescription)

Creates a new Framebuffer.

public abstract Framebuffer CreateFramebuffer(ref FramebufferDescription description)

Parameters

description FramebufferDescription

The desired properties of the created object.

Returns

Framebuffer

A new Framebuffer.

CreateGraphicsPipeline(GraphicsPipelineDescription)

Creates a new Pipeline.

public Pipeline CreateGraphicsPipeline(GraphicsPipelineDescription description)

Parameters

description GraphicsPipelineDescription

The desired properties of the created object.

Returns

Pipeline

A new Pipeline.

CreateGraphicsPipeline(ref GraphicsPipelineDescription)

Creates a new Pipeline object.

public Pipeline CreateGraphicsPipeline(ref GraphicsPipelineDescription description)

Parameters

description GraphicsPipelineDescription

The desired properties of the created object.

Returns

Pipeline

A new Pipeline which, when bound to a CommandList, is used to dispatch draw commands.

CreateGraphicsPipelineCore(ref GraphicsPipelineDescription)

protected abstract Pipeline CreateGraphicsPipelineCore(ref GraphicsPipelineDescription description)

Parameters

description GraphicsPipelineDescription

Returns

Pipeline

CreateResourceLayout(ResourceLayoutDescription)

Creates a new ResourceLayout.

public ResourceLayout CreateResourceLayout(ResourceLayoutDescription description)

Parameters

description ResourceLayoutDescription

The desired properties of the created object.

Returns

ResourceLayout

A new ResourceLayout.

CreateResourceLayout(ref ResourceLayoutDescription)

Creates a new ResourceLayout.

public abstract ResourceLayout CreateResourceLayout(ref ResourceLayoutDescription description)

Parameters

description ResourceLayoutDescription

The desired properties of the created object.

Returns

ResourceLayout

A new ResourceLayout.

CreateResourceSet(ResourceSetDescription)

Creates a new ResourceSet.

public ResourceSet CreateResourceSet(ResourceSetDescription description)

Parameters

description ResourceSetDescription

The desired properties of the created object.

Returns

ResourceSet

A new ResourceSet.

CreateResourceSet(ref ResourceSetDescription)

Creates a new ResourceSet.

public abstract ResourceSet CreateResourceSet(ref ResourceSetDescription description)

Parameters

description ResourceSetDescription

The desired properties of the created object.

Returns

ResourceSet

A new ResourceSet.

CreateSampler(SamplerDescription)

Creates a new Sampler.

public Sampler CreateSampler(SamplerDescription description)

Parameters

description SamplerDescription

The desired properties of the created object.

Returns

Sampler

A new Sampler.

CreateSampler(ref SamplerDescription)

Creates a new Sampler.

public Sampler CreateSampler(ref SamplerDescription description)

Parameters

description SamplerDescription

The desired properties of the created object.

Returns

Sampler

A new Sampler.

CreateSamplerCore(ref SamplerDescription)

protected abstract Sampler CreateSamplerCore(ref SamplerDescription description)

Parameters

description SamplerDescription

Returns

Sampler

CreateShader(ShaderDescription)

Creates a new Shader.

public Shader CreateShader(ShaderDescription description)

Parameters

description ShaderDescription

The desired properties of the created object.

Returns

Shader

A new Shader.

CreateShader(ref ShaderDescription)

Creates a new Shader.

public Shader CreateShader(ref ShaderDescription description)

Parameters

description ShaderDescription

The desired properties of the created object.

Returns

Shader

A new Shader.

CreateShaderCore(ref ShaderDescription)

protected abstract Shader CreateShaderCore(ref ShaderDescription description)

Parameters

description ShaderDescription

Returns

Shader

CreateSwapchain(SwapchainDescription)

Creates a new Swapchain.

public Swapchain CreateSwapchain(SwapchainDescription description)

Parameters

description SwapchainDescription

The desired properties of the created object.

Returns

Swapchain

A new Swapchain.

CreateSwapchain(ref SwapchainDescription)

Creates a new Swapchain.

public abstract Swapchain CreateSwapchain(ref SwapchainDescription description)

Parameters

description SwapchainDescription

The desired properties of the created object.

Returns

Swapchain

A new Swapchain.

CreateTexture(TextureDescription)

Creates a new Texture.

public Texture CreateTexture(TextureDescription description)

Parameters

description TextureDescription

The desired properties of the created object.

Returns

Texture

A new Texture.

CreateTexture(ref TextureDescription)

Creates a new Texture.

public Texture CreateTexture(ref TextureDescription description)

Parameters

description TextureDescription

The desired properties of the created object.

Returns

Texture

A new Texture.

CreateTexture(ulong, TextureDescription)

Creates a new Texture from an existing native texture.

public Texture CreateTexture(ulong nativeTexture, TextureDescription description)

Parameters

nativeTexture ulong

A backend-specific handle identifying an existing native texture. See remarks.

description TextureDescription

The properties of the existing Texture.

Returns

Texture

A new Texture wrapping the existing native texture.

Remarks

The nativeTexture parameter is backend-specific, and the type of data passed in depends on which graphics API is being used. When using the Vulkan backend, nativeTexture must be a valid VkImage handle. When using the D3D11 backend, nativeTexture must be a valid pointer to an ID3D11Texture1D, ID3D11Texture2D, or ID3D11Texture3D. When using the OpenGL backend, nativeTexture must be a valid OpenGL texture name. The properties of the Texture will be determined from the TextureDescription passed in. These properties must match the true properties of the existing native texture.

CreateTexture(ulong, ref TextureDescription)

Creates a new Texture from an existing native texture.

public Texture CreateTexture(ulong nativeTexture, ref TextureDescription description)

Parameters

nativeTexture ulong

A backend-specific handle identifying an existing native texture. See remarks.

description TextureDescription

The properties of the existing Texture.

Returns

Texture

A new Texture wrapping the existing native texture.

Remarks

The nativeTexture parameter is backend-specific, and the type of data passed in depends on which graphics API is being used. When using the Vulkan backend, nativeTexture must be a valid VkImage handle. When using the D3D11 backend, nativeTexture must be a valid pointer to an ID3D11Texture1D, ID3D11Texture2D, or ID3D11Texture3D. When using the OpenGL backend, nativeTexture must be a valid OpenGL texture name. The properties of the Texture will be determined from the TextureDescription passed in. These properties must match the true properties of the existing native texture.

CreateTextureCore(ref TextureDescription)

protected abstract Texture CreateTextureCore(ref TextureDescription description)

Parameters

description TextureDescription

Returns

Texture

CreateTextureCore(ulong, ref TextureDescription)

protected abstract Texture CreateTextureCore(ulong nativeTexture, ref TextureDescription description)

Parameters

nativeTexture ulong
description TextureDescription

Returns

Texture

CreateTextureView(Texture)

Creates a new TextureView.

public TextureView CreateTextureView(Texture target)

Parameters

target Texture

The target Texture used in the new view.

Returns

TextureView

A new TextureView.

CreateTextureView(TextureViewDescription)

Creates a new TextureView.

public TextureView CreateTextureView(TextureViewDescription description)

Parameters

description TextureViewDescription

The desired properties of the created object.

Returns

TextureView

A new TextureView.

CreateTextureView(ref TextureViewDescription)

Creates a new TextureView.

public TextureView CreateTextureView(ref TextureViewDescription description)

Parameters

description TextureViewDescription

The desired properties of the created object.

Returns

TextureView

A new TextureView.

CreateTextureViewCore(ref TextureViewDescription)

protected abstract TextureView CreateTextureViewCore(ref TextureViewDescription description)

Parameters

description TextureViewDescription

Returns

TextureView