Skip to content

Latest commit

 

History

History
61 lines (31 loc) · 3.35 KB

Samples.md

File metadata and controls

61 lines (31 loc) · 3.35 KB

Samples

TerraFX provides multiple samples; both to showcase the current features and help provides examples of how to utilize the framework.

Each example will give a brief explanation, share the that can be used to run the sample, and provide a screenshot showing an example of the output.

Availability

Most samples are cross-platform and provide support for executing on any support platform/architecture. Some samples, however, are only available on certain systems. For example, most Direct3D 12 samples are only available on Windows. There are, however, Vulkan variants that can be run on Windows or Linux.

This shows how a user can get a list of the graphics adapters (both physical and virtual) supported by the current system.

Enumerate Graphics Adapters Sample Image

This shows how a user can trivially create a blank window and then "clear" it to the specified color. In this case, Cornflower Blue.

Hello Window Sample Image

This expands on HelloWindow and renders a single triangle using vertice coloring.

Hello Triangle Sample Image

This expands on HelloTriangle to render a square using a second triangle. It adds in the concept of index buffers so 4 vertices, rather than 6 can be specified.

Hello Quad Sample Image

This expands on HelloTriangle to move the triangle horizontally across the screen using a constant buffer to supply the transformation.

This expands on HelloTriangle by using a texture to color the triangle. It appears as a black and white checkerboard.

Hello Texture Sample Image

This effectively combines HelloTexture and HelloTransform showing how both constant buffers and textures can be supplied to the shader. The triangle moves in a circle rather than horizontally.

This expands on HelloQuad by using a texture to color the square. It uses a 3D rather than 2D texture which allows it to appear animated.

Hello Texture3D Sample Image

This shows how a user can get a list of the audio adapters (both physical and virtual) supported by the current system.

This shows how a user can easily play a sine wave with a specific frequency, even if the underlying device operates at a different frequency.