Rename load_vulkan to new, as Vulkan is loaded at startup time
This commit is contained in:
parent
2ce185959b
commit
a02fb615c0
|
@ -111,7 +111,7 @@ use ash::{Device, Instance};
|
|||
use ash::version::V1_0;
|
||||
// Those traits implement the version specific functions
|
||||
use ash::{InstanceV1_0, DeviceV1_0};
|
||||
let entry = Entry::<V1_0>::load_vulkan().unwrap();
|
||||
let entry = Entry::<V1_0>::new().unwrap();
|
||||
let instance = entry.create_instance(...).expect("Instance creation error.");
|
||||
let device = instance.create_device(...).expect("Device creation error.");
|
||||
```
|
||||
|
|
|
@ -241,7 +241,7 @@ impl ExampleBase {
|
|||
.with_window_resize_callback(resize_callback)
|
||||
.build()
|
||||
.unwrap();
|
||||
let entry = Entry::load_vulkan().unwrap();
|
||||
let entry = Entry::new().unwrap();
|
||||
let app_name = CString::new("VulkanTriangle").unwrap();
|
||||
let raw_name = app_name.as_ptr();
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ impl<V: FunctionPointers> Entry<V> {
|
|||
Ok(Instance::from_raw(instance, instance_fp))
|
||||
}
|
||||
}
|
||||
pub fn load_vulkan() -> Result<Entry<V>, LoadingError> {
|
||||
pub fn new() -> Result<Entry<V>, LoadingError> {
|
||||
let static_fn = match *VK_LIB {
|
||||
Ok(ref lib) => {
|
||||
let static_fn = vk::StaticFn::load(|name| unsafe {
|
||||
|
|
Loading…
Reference in a new issue