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
featuresGraphicsDeviceFeatures
Properties
BackendType
Gets the GraphicsBackend of this instance.
public abstract GraphicsBackend BackendType { get; }
Property Value
Features
Gets the GraphicsDeviceFeatures this instance was created with.
public GraphicsDeviceFeatures Features { get; }
Property Value
Methods
CreateBuffer(BufferDescription)
Creates a new DeviceBuffer.
public DeviceBuffer CreateBuffer(BufferDescription description)
Parameters
descriptionBufferDescriptionThe 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
descriptionBufferDescriptionThe desired properties of the created object.
Returns
- DeviceBuffer
A new DeviceBuffer.
CreateBufferCore(ref BufferDescription)
protected abstract DeviceBuffer CreateBufferCore(ref BufferDescription description)
Parameters
descriptionBufferDescription
Returns
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
descriptionCommandListDescriptionThe 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
descriptionCommandListDescriptionThe 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
descriptionComputePipelineDescriptionThe desirede properties of the created object.
Returns
CreateComputePipeline(ref ComputePipelineDescription)
Creates a new compute Pipeline object.
public abstract Pipeline CreateComputePipeline(ref ComputePipelineDescription description)
Parameters
descriptionComputePipelineDescriptionThe desirede properties of the created object.
Returns
CreateFence(bool)
Creates a new Fence in the given state.
public abstract Fence CreateFence(bool signaled)
Parameters
signaledboolA value indicating whether the Fence should be in the signaled state when created.
Returns
CreateFramebuffer(FramebufferDescription)
Creates a new Framebuffer.
public Framebuffer CreateFramebuffer(FramebufferDescription description)
Parameters
descriptionFramebufferDescriptionThe 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
descriptionFramebufferDescriptionThe desired properties of the created object.
Returns
- Framebuffer
A new Framebuffer.
CreateGraphicsPipeline(GraphicsPipelineDescription)
Creates a new Pipeline.
public Pipeline CreateGraphicsPipeline(GraphicsPipelineDescription description)
Parameters
descriptionGraphicsPipelineDescriptionThe desired properties of the created object.
Returns
CreateGraphicsPipeline(ref GraphicsPipelineDescription)
Creates a new Pipeline object.
public Pipeline CreateGraphicsPipeline(ref GraphicsPipelineDescription description)
Parameters
descriptionGraphicsPipelineDescriptionThe desired properties of the created object.
Returns
CreateGraphicsPipelineCore(ref GraphicsPipelineDescription)
protected abstract Pipeline CreateGraphicsPipelineCore(ref GraphicsPipelineDescription description)
Parameters
descriptionGraphicsPipelineDescription
Returns
CreateResourceLayout(ResourceLayoutDescription)
Creates a new ResourceLayout.
public ResourceLayout CreateResourceLayout(ResourceLayoutDescription description)
Parameters
descriptionResourceLayoutDescriptionThe 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
descriptionResourceLayoutDescriptionThe desired properties of the created object.
Returns
- ResourceLayout
A new ResourceLayout.
CreateResourceSet(ResourceSetDescription)
Creates a new ResourceSet.
public ResourceSet CreateResourceSet(ResourceSetDescription description)
Parameters
descriptionResourceSetDescriptionThe 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
descriptionResourceSetDescriptionThe desired properties of the created object.
Returns
- ResourceSet
A new ResourceSet.
CreateSampler(SamplerDescription)
Creates a new Sampler.
public Sampler CreateSampler(SamplerDescription description)
Parameters
descriptionSamplerDescriptionThe desired properties of the created object.
Returns
CreateSampler(ref SamplerDescription)
Creates a new Sampler.
public Sampler CreateSampler(ref SamplerDescription description)
Parameters
descriptionSamplerDescriptionThe desired properties of the created object.
Returns
CreateSamplerCore(ref SamplerDescription)
protected abstract Sampler CreateSamplerCore(ref SamplerDescription description)
Parameters
descriptionSamplerDescription
Returns
CreateShader(ShaderDescription)
Creates a new Shader.
public Shader CreateShader(ShaderDescription description)
Parameters
descriptionShaderDescriptionThe desired properties of the created object.
Returns
CreateShader(ref ShaderDescription)
Creates a new Shader.
public Shader CreateShader(ref ShaderDescription description)
Parameters
descriptionShaderDescriptionThe desired properties of the created object.
Returns
CreateShaderCore(ref ShaderDescription)
protected abstract Shader CreateShaderCore(ref ShaderDescription description)
Parameters
descriptionShaderDescription
Returns
CreateSwapchain(SwapchainDescription)
Creates a new Swapchain.
public Swapchain CreateSwapchain(SwapchainDescription description)
Parameters
descriptionSwapchainDescriptionThe desired properties of the created object.
Returns
CreateSwapchain(ref SwapchainDescription)
Creates a new Swapchain.
public abstract Swapchain CreateSwapchain(ref SwapchainDescription description)
Parameters
descriptionSwapchainDescriptionThe desired properties of the created object.
Returns
CreateTexture(TextureDescription)
Creates a new Texture.
public Texture CreateTexture(TextureDescription description)
Parameters
descriptionTextureDescriptionThe desired properties of the created object.
Returns
CreateTexture(ref TextureDescription)
Creates a new Texture.
public Texture CreateTexture(ref TextureDescription description)
Parameters
descriptionTextureDescriptionThe desired properties of the created object.
Returns
CreateTexture(ulong, TextureDescription)
Creates a new Texture from an existing native texture.
public Texture CreateTexture(ulong nativeTexture, TextureDescription description)
Parameters
nativeTextureulongA backend-specific handle identifying an existing native texture. See remarks.
descriptionTextureDescriptionThe properties of the existing Texture.
Returns
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
nativeTextureulongA backend-specific handle identifying an existing native texture. See remarks.
descriptionTextureDescriptionThe properties of the existing Texture.
Returns
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
descriptionTextureDescription
Returns
CreateTextureCore(ulong, ref TextureDescription)
protected abstract Texture CreateTextureCore(ulong nativeTexture, ref TextureDescription description)
Parameters
nativeTextureulongdescriptionTextureDescription
Returns
CreateTextureView(Texture)
Creates a new TextureView.
public TextureView CreateTextureView(Texture target)
Parameters
Returns
- TextureView
A new TextureView.
CreateTextureView(TextureViewDescription)
Creates a new TextureView.
public TextureView CreateTextureView(TextureViewDescription description)
Parameters
descriptionTextureViewDescriptionThe 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
descriptionTextureViewDescriptionThe desired properties of the created object.
Returns
- TextureView
A new TextureView.
CreateTextureViewCore(ref TextureViewDescription)
protected abstract TextureView CreateTextureViewCore(ref TextureViewDescription description)
Parameters
descriptionTextureViewDescription