fixed packages
This commit is contained in:
parent
624e19d84c
commit
a99a15dded
|
@ -1,4 +1,5 @@
|
||||||
mod vulkan;
|
mod vulkan;
|
||||||
|
mod shader;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
vulkan::init();
|
vulkan::init();
|
||||||
|
|
|
@ -7,7 +7,7 @@ use vulkano::pipeline::graphics::vertex_input::Vertex;
|
||||||
use vulkano::pipeline::graphics::viewport::ViewportState;
|
use vulkano::pipeline::graphics::viewport::ViewportState;
|
||||||
use vulkano::pipeline::GraphicsPipeline;
|
use vulkano::pipeline::GraphicsPipeline;
|
||||||
use vulkano::render_pass::{RenderPass, Subpass};
|
use vulkano::render_pass::{RenderPass, Subpass};
|
||||||
use crate::Vertex2d;
|
use crate::vulkan::Vertex2d;
|
||||||
|
|
||||||
pub fn create_program(render_pass: &Arc<RenderPass>, device: &Arc<Device>) -> Arc<GraphicsPipeline> {
|
pub fn create_program(render_pass: &Arc<RenderPass>, device: &Arc<Device>) -> Arc<GraphicsPipeline> {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
mod composite;
|
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use vulkano::device::{Device, DeviceCreateInfo, DeviceExtensions, Properties, Queue, QueueCreateInfo, QueueFlags};
|
use vulkano::device::{Device, DeviceCreateInfo, DeviceExtensions, Properties, Queue, QueueCreateInfo, QueueFlags};
|
||||||
|
@ -26,7 +25,7 @@ use winit::event::{Event, WindowEvent};
|
||||||
// guarantees*.
|
// guarantees*.
|
||||||
#[derive(BufferContents, Vertex)]
|
#[derive(BufferContents, Vertex)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct Vertex2d {
|
pub(crate) struct Vertex2d {
|
||||||
#[format(R32G32_SFLOAT)]
|
#[format(R32G32_SFLOAT)]
|
||||||
position: [f32; 2],
|
position: [f32; 2],
|
||||||
#[format(R32G32_SFLOAT)]
|
#[format(R32G32_SFLOAT)]
|
||||||
|
@ -153,7 +152,7 @@ pub fn init() {
|
||||||
// that, we store the submission of the previous frame here.
|
// that, we store the submission of the previous frame here.
|
||||||
let mut previous_frame_end = Some(sync::now(device.clone()).boxed());
|
let mut previous_frame_end = Some(sync::now(device.clone()).boxed());
|
||||||
|
|
||||||
let pipeline = composite::create_program(&render_pass, &device);
|
let pipeline = crate::shader::create_program(&render_pass, &device);
|
||||||
|
|
||||||
event_loop.run(move |event, _, control_flow| {
|
event_loop.run(move |event, _, control_flow| {
|
||||||
match event {
|
match event {
|
||||||
|
|
Reference in New Issue