Skip to content
Harrand edited this page Apr 23, 2022 · 9 revisions

Demos

Demos are small applications designed to 'show-off' engine features in a very basic way. Unlike tests, demos are always visible in a window. They serve no purpose but as examples of engine usage that is easy to understand.

All demos can be found at Topaz/demo. Each topaz module has its own demos. Core demos will not be listed here, because they are extremely simple. However, you're free to investigate them yourself.

Topaz Triangle Demo

This is the simplest of all graphics demos. It simply displays a triangle within a window. It is utterly barebones - There is no depth testing, the window is not resizeable and it contains no resources. If you're just starting with the engine, this is an excellent learning resource.

Topaz Dynamic Triangle Demo

This is a little more involved than the previous demo. Initially, it displays a single triangle. This time however, there is depth testing, the window is fully resizeable and the triangle data is sourced from a buffer resource.

The buffer resource is dynamic and variable, meaning its contents can change or be resized at any time. Every 500 frames, the buffer resource is expanded to add a new triangle to be rendered. This lasts forever, meaning eventually this program will exhaust memory.

If you want to learn more about how to use buffer resources, this demo is an excellent learning resource.

Samples

As demos are included as part of the engine, they do not make it necessarily clear as to how you actually create your own applications without making changes to the engine. For this, a separate repository exists known as Topaz_Samples which I would recommend you visit if you're ready to create your own topaz application.