BC1!!!
This commit is contained in:
@@ -2,8 +2,6 @@ use std::sync::Arc;
|
||||
use std::time::SystemTime;
|
||||
|
||||
use cgmath::{Matrix4, SquareMatrix};
|
||||
use image::{ImageBuffer, Rgb, Rgba};
|
||||
use image::buffer::ConvertBuffer;
|
||||
use vulkano::{buffer::{BufferUsage, CpuAccessibleBuffer}, command_buffer::SubpassContents, image::MipmapsCount};
|
||||
use vulkano::command_buffer::{AutoCommandBuffer, AutoCommandBufferBuilder, DynamicState};
|
||||
use vulkano::descriptor::DescriptorSet;
|
||||
@@ -434,9 +432,7 @@ impl VulkanRenderer {
|
||||
}
|
||||
|
||||
pub fn upload_texture(self: &mut Self, bytes: &[u8], width: u32, height: u32, format: Format, device: Arc<Device>) {
|
||||
// Format buffer on cpu for upload
|
||||
let dimensions = Dimensions::Dim2d { width, height };
|
||||
|
||||
let (image_view, future) = ImmutableImage::from_iter(bytes.iter().cloned(), dimensions, MipmapsCount::One, format, self.queue.clone()).unwrap();
|
||||
future.flush().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user