text almost works

This commit is contained in:
2021-08-15 23:29:25 +02:00
parent 40aa7f635e
commit fb045f210a
10 changed files with 30 additions and 25 deletions

View File

@@ -155,6 +155,7 @@ impl VulkanRenderer {
ext_debug_utils: true,
..vulkano_win::required_extensions()
};
println!("Using extensions: {:?}", extensions);
let app_info = ApplicationInfo {
application_name: Some("Asuro's Editor".into()),
@@ -454,7 +455,7 @@ impl VulkanRenderer {
}
}
pub fn upload_texture(self: &mut Self, bytes: &[u8], width: u32, height: u32, format: Format, device: Arc<Device>) {
pub fn upload_texture(self: &mut Self, bytes: &[u8], width: u32, height: u32, format: Format, filter: Filter, device: Arc<Device>) {
let dimensions = Dimensions::Dim2d { width, height };
let usage = ImageUsage {
@@ -538,7 +539,7 @@ impl VulkanRenderer {
future.flush().unwrap();
let sampler = Sampler::new(device.clone(), Filter::Linear, Filter::Linear,
let sampler = Sampler::new(device.clone(), filter, filter,
MipmapMode::Linear, SamplerAddressMode::Repeat, SamplerAddressMode::Repeat,
SamplerAddressMode::Repeat, 0.0, 1.0, 0.0, (image_view.mipmap_levels() - 1) as f32).unwrap();