////
- Copyright (c) 2021-2025, The Khronos Group
-
- SPDX-License-Identifier: Apache-2.0
-
- Licensed under the Apache License, Version 2.0 the "License";
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
////
ifndef::api_samplespath[:api_samplespath:]

== API samples

The goal of these samples is to demonstrate how to use a given Vulkan feature at the API level with as little abstraction as possible.

=== xref:./{api_samplespath}compute_nbody/README.adoc[Compute shader N-Body simulation]

Compute shader example that uses two passes and shared compute shader memory for simulating a N-Body particle system.

=== xref:./{api_samplespath}dynamic_uniform_buffers/README.adoc[Dynamic Uniform buffers]

Dynamic uniform buffers are used for rendering multiple objects with separate matrices stored in a single uniform buffer object, that are addressed dynamically.

=== xref:./{api_samplespath}hdr/README.adoc[High dynamic range]

Implements a high dynamic range rendering pipeline using 16/32 bit floating point precision for all calculations.

=== xref:./{api_samplespath}hello_triangle/README.adoc[Hello Triangle]

A self-contained (minimal use of framework) sample that illustrates the rendering of a triangle using unextended Vulkan 1.1.

=== xref:./{api_samplespath}hello_triangle_1_3/README.adoc[Hello Triangle 1.3]

A self-contained (minimal use of framework) sample that illustrates the rendering of a triangle using Vulkan 1.3 features.

=== xref:./{api_samplespath}hpp_compute_nbody/README.adoc[HPP Compute shader N-Body simulation]

A transcoded version of the API sample xref:./{api_samplespath}compute_nbody/README.adoc[Compute N-Body] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_dynamic_uniform_buffers/README.adoc[HPP Dynamic Uniform Buffers]

A transcoded version of the API sample xref:./{api_samplespath}dynamic_uniform_buffers/README.adoc[Dynamic Uniform buffers] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_hdr/README.adoc[HPP High dynamic range]

A transcoded version of the API sample xref:./{api_samplespath}hdr/README.adoc[High dynamic range] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_hello_triangle/README.adoc[HPP Hello Triangle]

A transcoded version of the API sample xref:./{api_samplespath}hello_triangle/README.adoc[Hello Triangle] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_hello_triangle_1_3/README.adoc[HPP Hello Triangle 1.3]

A transcoded version of the API sample xref:./{api_samplespath}hello_triangle_1_3/README.adoc[Hello Triangle 1.3] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_instancing/README.adoc[HPP Instancing]

A transcoded version of the API sample xref:./{api_samplespath}instancing/README.adoc[Instancing] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_oit_depth_peeling/README.adoc[HPP OIT Depth Peeling]

A transcoded version of the API sample xref:./{api_samplespath}oit_depth_peeling/README.adoc[OIT Depth Peeling] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_oit_linked_lists/README.adoc[HPP OIT Linked Lists]

A transcoded version of the API sample xref:./{api_samplespath}oit_linked_lists/README.adoc[OIT Linked Lists] that illustrates the usage of the C{pp} bindings of Vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_separate_image_sampler/README.adoc[HPP Separate image sampler]

A transcoded version of the API sample xref:./{api_samplespath}separate_image_sampler/README.adoc[Separate image sampler] that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_terrain_tessellation/README.adoc[HPP Terrain Tessellation]

A transcoded version of the API sample xref:./{api_samplespath}terrain_tessellation/README.adoc[Terrain Tessellation] that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_texture_loading/README.adoc[HPP Texture Loading]

A transcoded version of the API sample xref:./{api_samplespath}texture_loading/README.adoc[Texture loading] that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_texture_mipmap_generation/README.adoc[HPP Texture run-time mip-map generation]

A transcoded version of the API sample xref:./{api_samplespath}texture_mipmap_generation/README.adoc[Texture run-time mip-map generation] that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}hpp_timestamp_queries/README.adoc[HPP Timestamp queries]

A transcoded version of the API samplexref:./{api_samplespath}timestamp_queries/README.adoc[Timestamp queries] that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.

=== xref:./{api_samplespath}instancing/README.adoc[Instancing]

Uses the instancing feature for rendering many instances of the same mesh from a single vertex buffer with variable parameters and textures.

=== xref:./{api_samplespath}separate_image_sampler/README.adoc[Separate image sampler]

Separate image and samplers, both in the application and the shaders.
The sample demonstrates how to use different samplers for the same image without the need to recreate descriptors.

=== xref:./{api_samplespath}terrain_tessellation/README.adoc[Terrain Tessellation]

Uses a tessellation shader for rendering a terrain with dynamic level-of-detail and frustum culling.

=== xref:./{api_samplespath}texture_loading/README.adoc[Texture loading]

Loading and rendering of a 2D texture map from a file.

=== xref:./{api_samplespath}texture_mipmap_generation/README.adoc[Texture run-time mip-map generation]

Generates a complete mip-chain for a texture at runtime instead of loading it from a file.

=== xref:./{api_samplespath}timestamp_queries/README.adoc[Timestamp queries]

Using timestamp queries for profiling GPU workloads.

=== xref:./{api_samplespath}swapchain_recreation/README.adoc[Swapchain recreation]

A sample that implements best practices in handling swapchain recreation, for example due to window resizing or present mode changes.

=== xref:./{api_samplespath}oit_linked_lists/README.adoc[Order-independent transparency with per-pixel ordered linked lists]

A sample that implements an order-independent transparency algorithm using per-pixel ordered linked lists.

=== xref:./{api_samplespath}oit_depth_peeling/README.adoc[Order-independent transparency with depth peeling]

A sample that implements order-independent transparency with depth peeling.