Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan 1 3 hello triangle sample #1230

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
** xref:samples/api/hdr/README.adoc[HDR]
*** xref:samples/api/hpp_hdr/README.adoc[HDR (Vulkan-Hpp)]
** xref:samples/api/hello_triangle/README.adoc[Hello Triangle]
** xref:samples/api/hello_triangle_1_3/README.adoc[Hello Triangle 1.3]
*** xref:samples/api/hpp_hello_triangle/README.adoc[Hello Triangle (Vulkan-Hpp)]
** xref:samples/api/hlsl_shaders/README.adoc[HLSL Shaders]
*** xref:samples/api/hpp_hlsl_shaders/README.adoc[HLSL Shaders (Vulkan-Hpp)]
Expand Down
4 changes: 4 additions & 0 deletions samples/api/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Implements a high dynamic range rendering pipeline using 16/32 bit floating poin

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

=== xref:./{api_samplespath}hello_triangle/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 <<compute_nbody,Compute N-Body>> that illustrates the usage of the C{pp} bindings of Vulkan provided by vulkan.hpp.
Expand Down
33 changes: 33 additions & 0 deletions samples/api/hello_triangle_1_3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2024, Huawei Technologies Co., Ltd.
#
# 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.

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH)
get_filename_component(CATEGORY_NAME ${PARENT_DIR} NAME)

add_sample(
ID ${FOLDER_NAME}
CATEGORY ${CATEGORY_NAME}
AUTHOR "Huawei Technologies Co., Ltd."
NAME "Vulkan 1.3 Hello Triangle"
DESCRIPTION "An introduction into Vulkan using Vulkan 1.3"
SHADER_FILES_GLSL
"hello_triangle_1_3/triangle.vert"
"hello_triangle_1_3/triangle.frag")
25 changes: 25 additions & 0 deletions samples/api/hello_triangle_1_3/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright (c) 2024, Huawei Technologies Co., Ltd.
*
* 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.
*/

= Vulkan 1.3 Hello Triangle

ifdef::site-gen-antora[]
TIP: The source for this sample can be found in the https://github.com/KhronosGroup/Vulkan-Samples/tree/main/samples/api/hello_triangle_1_3[Khronos Vulkan samples github repository].
endif::[]


A self-contained sample that illustrates the rendering of a triangle using Vulkan 1.3 using features like dynamic rendering, synchronization2 and pipeline dynamic state .
Loading