vulkano reeeeeeeeeeee
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
use std::fs;
|
||||
use std::{convert::TryInto, fs};
|
||||
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use toml;
|
||||
use vulkano::image::SampleCount;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
|
||||
pub struct LogConfigInput {
|
||||
@@ -33,4 +34,8 @@ impl RenderConfig {
|
||||
pub fn from_file(path: &str) -> Self {
|
||||
toml::from_slice(&fs::read(path).expect("Failed to read render config!")).expect("Failed to parse render config!")
|
||||
}
|
||||
|
||||
pub fn get_msaa(&self) -> Option<SampleCount> {
|
||||
if self.msaa_samples > 0 { self.msaa_samples.try_into().ok() } else { None }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user