Show / Hide Table of Contents

Class CustomVeldridBase

Override this base class to enable the creation of a custom rendering stage with exposure to all key components (device, factory, window, commandlist) The render method has access to an optional 4 input textures and single render target The update has raw access to the latest veldrid input snapshot object

Inheritance
System.Object
CustomVeldridBase
Namespace: Yak2D
Assembly: Yak2D.Api.dll
Syntax
public abstract class CustomVeldridBase : object

Methods

DisposeOfResources()

Dispose of any resources that will not be processed by the veldrid resource collector factory

Declaration
public abstract void DisposeOfResources()

Initialise(GraphicsDevice, Sdl2Window, DisposeCollectorResourceFactory)

Called by the framework when custom stage is created. Create all required resources

Declaration
public abstract void Initialise(GraphicsDevice device, Sdl2Window window, DisposeCollectorResourceFactory factory)
Parameters
Type Name Description
GraphicsDevice device

Current veldrid graphics device object

Sdl2Window window

Current SDL2 window

DisposeCollectorResourceFactory factory

Current veldrid resource factory, with auto-dispose

Render(CommandList, GraphicsDevice, ResourceSet, ResourceSet, ResourceSet, ResourceSet, Framebuffer)

Declaration
public abstract void Render(CommandList cl, GraphicsDevice device, ResourceSet texture0, ResourceSet texture1, ResourceSet texture2, ResourceSet texture3, Framebuffer framebufferTarget)
Parameters
Type Name Description
CommandList cl
GraphicsDevice device
ResourceSet texture0
ResourceSet texture1
ResourceSet texture2
ResourceSet texture3
Framebuffer framebufferTarget

Update(Single, InputSnapshot)

Called by framework once per update loop

Declaration
public abstract void Update(float timeStepSeconds, InputSnapshot inputSnapshot)
Parameters
Type Name Description
System.Single timeStepSeconds

Time in seconds since the last update loop

InputSnapshot inputSnapshot

Raw veldrid input snapshot object

In This Article
Back to top yak2D - Alex Paterson