Skip to content

First Look Content

Robert Campbell edited this page Jun 3, 2023 · 1 revision

Subsystem Overview

Ultraviolet’s Content subsystem is exposed through the IUltravioletContent interface, which you can retrieve an instance of by calling UltravioletContext.GetContent(). This interface allows you to change the state of the graphics device.

Check out the reference documentation for a complete run-down what what the IUltravioletContent interface is capable of. Here’s a brief overview of some of the important points.

You can register content manifests, which allow your application to access content assets using standard identifiers rather than file system paths, using the Manifests property.

You can register content importers, which load files from the file system and convert them into intermediate representations for further processing, using the Importers property.

You can register content processors, which convert imported intermediate representations of content assets into their final runtime formats, using the Processors property.

You can register all of the importers and processors in an assembly using the RegisterImportersAndProcessors() method.

Associated Resources

This list is not exhaustive, but should be enough to get you started. Check out the reference documentation for more information.

The ContentManager class loads content assets from the file system and manages their lifetimes.

The ContentImporter abstract class defines the interface for content importers. Each content importer is associated with one or more file extensions, and is capable of converting files of those types into a single intermediate representation in memory.

The ContentProcessor abstract class defines the interface for content processors. Each content processor takes one type of intermediate representation created by a content importer as its input, and produces one type of runtime content asset as its output.

The ContentManifest class represents a list of content assets which are used by your application. Using a content manifest, you can avoid littering your application with hardcoded file paths.

The AsynchronousContentLoader class provides a simple interface for loading content assets in a background thread, which allows you to avoid stalling the rendering pipeline.

Clone this wiki locally