This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let vk_builder = vk::InstanceBuilder::new(); | |
let vk_builder = vk_builder.extensions(vk::required_windowing_extensions()); | |
let vk_instance = vk_builder.add_extensions(vk::InstanceExtensions{ | |
ext_debug_report: true, | |
..vk::InstanceExtensions::none() | |
}) | |
.layers(vec!["VK_LAYER_LUNARG_api_dump"]) | |
.build() | |
.expect("failed to create vulkan instance"); | |
nannou::app(model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nannou; | |
use nannou::prelude::*; | |
use nannou::ui::prelude::*; | |
fn main() { | |
nannou::app(model).update(update).simple_window(view).run(); | |
} | |
struct Model { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate nannou; | |
use nannou::prelude::*; | |
use nannou::vulkano; | |
use std::cell::RefCell; | |
use std::sync::Arc; | |
use nannou::vulkano::buffer::{BufferUsage, CpuAccessibleBuffer}; | |
use nannou::vulkano::command_buffer::DynamicState; | |
use nannou::vulkano::device::DeviceOwned; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vulkan/vulkan.h> | |
#include <vector> | |
#include <string.h> | |
#include <assert.h> | |
#include <stdexcept> | |
#include <cmath> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last login: Fri Nov 30 15:59:56 on ttys003 | |
/var/folders/h4/gvwnxl3x66x7k2nb0_s4jljc0000gn/T/AppTranslocation/CF5CF948-3B1D-4F88-878C-8B86D5F8B3A2/d/vulkaninfo.app/Contents/MacOS/vulkaninfo ; exit; | |
Welcome to fish, the friendly interactive shell | |
⋊> ~ /var/folders/h4/gvwnxl3x66x7k2nb0_s4jljc0000gn/T/AppTranslocation/CF5CF9483B1D-4F88-878C-8B86D5F8B3A2/d/vulkaninfo.app/Contents/MacOS/vulkaninfo ; exit; | |
========== | |
VULKANINFO | |
========== | |
Vulkan Instance Version: 1.1.92 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn interleave<T>(channels: &[Vec<T>], target: &mut Vec<T>) | |
where | |
T: std::marker::Copy, | |
{ | |
assert!(!channels.is_empty()); | |
target.clear(); | |
let frames = channels[0].len(); | |
target.extend((0 .. frames).flat_map(|f| channels.iter().map(move |ch| ch[f]))); | |
} |
NewerOlder