1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
// Copyright (c) 2016 The vulkano developers // Licensed under the Apache License, Version 2.0 // <LICENSE-APACHE or // https://www.apache.org/licenses/LICENSE-2.0> or the MIT // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, // at your option. All files in the project carrying such // notice may not be copied, modified, or distributed except // according to those terms. //! API entry point. //! //! The first thing to do before you start using Vulkan is to create an `Instance` object. //! //! For example: //! //! ```no_run //! use vulkano::instance::Instance; //! use vulkano::instance::InstanceExtensions; //! use vulkano::Version; //! //! let instance = match Instance::new(None, Version::V1_1, &InstanceExtensions::none(), None) { //! Ok(i) => i, //! Err(err) => panic!("Couldn't build instance: {:?}", err) //! }; //! ``` //! //! Creating an instance initializes everything and allows you to enumerate physical devices, //! ie. all the Vulkan implementations that are available on the system. //! //! ```no_run //! # use vulkano::instance::Instance; //! # use vulkano::instance::InstanceExtensions; //! # use vulkano::Version; //! use vulkano::instance::PhysicalDevice; //! //! # let instance = Instance::new(None, Version::V1_1, &InstanceExtensions::none(), None).unwrap(); //! for physical_device in PhysicalDevice::enumerate(&instance) { //! println!("Available device: {}", physical_device.properties().device_name.as_ref().unwrap()); //! } //! ``` //! //! # Enumerating physical devices and creating a device //! //! After you have created an instance, the next step is usually to enumerate the physical devices //! that are available on the system with `PhysicalDevice::enumerate()` (see above). //! //! When choosing which physical device to use, keep in mind that physical devices may or may not //! be able to draw to a certain surface (ie. to a window or a monitor), or may even not be able //! to draw at all. See the `swapchain` module for more information about surfaces. //! //! Once you have chosen a physical device, you can create a `Device` object from it. See the //! `device` module for more info. pub use self::extensions::InstanceExtensions; pub use self::instance::ApplicationInfo; pub use self::instance::Instance; pub use self::instance::InstanceCreationError; pub use self::layers::layers_list; pub use self::layers::LayerProperties; pub use self::layers::LayersIterator; pub use self::layers::LayersListError; pub use self::loader::LoadingError; pub use self::physical_device::ConformanceVersion; pub use self::physical_device::DriverId; pub use self::physical_device::MemoryHeap; pub use self::physical_device::MemoryHeapsIter; pub use self::physical_device::MemoryType; pub use self::physical_device::MemoryTypesIter; pub use self::physical_device::PhysicalDevice; pub use self::physical_device::PhysicalDeviceType; pub use self::physical_device::PhysicalDevicesIter; pub use self::physical_device::PointClippingBehavior; pub use self::physical_device::QueueFamiliesIter; pub use self::physical_device::QueueFamily; pub use self::physical_device::ShaderCoreProperties; pub use self::physical_device::ShaderFloatControlsIndependence; pub use self::physical_device::SubgroupFeatures; pub use crate::extensions::{ ExtensionRestriction, ExtensionRestrictionError, SupportedExtensionsError, }; pub use crate::version::Version; pub mod debug; pub(crate) mod extensions; mod instance; mod layers; pub mod loader; mod physical_device;