Cleanup on Samples (#295)
- introduced samples/utils functions in namespace vk::su (vulkan sample utils) - introduced usage of debugReportCallback
This commit is contained in:
committed by
Markus Tavenrath
parent
018ebdd87f
commit
f0dc8d6f38
@@ -1,4 +1,4 @@
|
||||
// Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
// Copyright(c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,7 @@
|
||||
// VulkanHpp Samples : 02_EnumerateDevices
|
||||
// Enumerate physical devices
|
||||
|
||||
#include "..\utils\utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
#include <iostream>
|
||||
|
||||
@@ -25,8 +26,10 @@ int main(int /*argc*/, char * /*argv[]*/)
|
||||
{
|
||||
try
|
||||
{
|
||||
vk::ApplicationInfo appInfo(AppName, 1, EngineName, 1, VK_API_VERSION_1_1);
|
||||
vk::UniqueInstance instance = vk::createInstanceUnique(vk::InstanceCreateInfo({}, &appInfo));
|
||||
vk::UniqueInstance instance = vk::su::createInstance(AppName, EngineName);
|
||||
#if !defined(NDEBUG)
|
||||
vk::UniqueDebugReportCallbackEXT debugReportCallback = vk::su::createDebugReportCallback(instance);
|
||||
#endif
|
||||
|
||||
/* VULKAN_HPP_KEY_START */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
# Copyright(c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,10 +17,12 @@ cmake_minimum_required(VERSION 3.2)
|
||||
project(02_EnumerateDevices)
|
||||
|
||||
set(HEADERS
|
||||
../utils/utils.hpp
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
02_EnumerateDevices.cpp
|
||||
../utils/utils.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
|
||||
Reference in New Issue
Block a user