libcruft-vk/tools/info.cpp

32 lines
877 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright:
* 2017, Danny Robson <danny@nerdcruft.net>
*/
#include <cruft/util/iterator.hpp>
#include <cruft/vk/instance.hpp>
#include <cruft/vk/physical_device.hpp>
#include <cruft/vk/ostream.hpp>
#include <iostream>
///////////////////////////////////////////////////////////////////////////////
int
main (int, char**)
{
std::cout << "available_layers: [ "
<< cruft::make_infix (cruft::vk::instance::available_layers ())
<< " ]\n";
cruft::vk::instance instance;
std::cout << "instance: " << instance << '\n';
for (const auto &d: cruft::vk::physical_device::find (instance))
std::cout << d << '\n';
}