Vixen
dd8b0a81
csharp
public interface IPreviewImages

Where a preview's texture becomes a number the interface can draw.

Read the guide page for this →

Remarks

⚠ An interface for the reason ThumbnailCache's is. A number an image command carries is handed out by UiRenderer.RegisterImage, and this assembly has no interface renderer and should not acquire one. The host that has both hands one of these over; without it a preview still compiles and still draws, and the swatch is what shows.

⚠ Unregistering is not optional. A registered view whose texture has been destroyed is a descriptor set pointing at freed memory, which is undefined behaviour rather than an error — see UiRenderer.RegisterImage's own warning. The renderer calls this before every destroy.

Methods (2)

  • ulong Register(TextureViewHandle view)

    Names a texture, and returns the number to draw it by.

  • void Release(ulong image)

    Gives up a number, before its texture is destroyed.

Used by (3)

  • CountingImagesVixen.Editor.ShaderGraph.Tests
  • ShaderGraphPreviewRendererVixen.Editor.ShaderGraph
  • UiPreviewImagesVixen.Editor.App