no more warnings
This commit is contained in:
@@ -51,6 +51,7 @@ fn _shader_module_from_file(device: Arc<Device>, path: &str) -> Arc<ShaderModule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
fn matches_extension(path: &PathBuf, extensions: &Vec<&str>) -> bool {
|
fn matches_extension(path: &PathBuf, extensions: &Vec<&str>) -> bool {
|
||||||
if let Some(Some(path_extension)) = path.extension().map(|e| e.to_str()) {
|
if let Some(Some(path_extension)) = path.extension().map(|e| e.to_str()) {
|
||||||
for extension in extensions {
|
for extension in extensions {
|
||||||
@@ -60,6 +61,7 @@ fn matches_extension(path: &PathBuf, extensions: &Vec<&str>) -> bool {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
fn compile_shaders() -> io::Result<()> {
|
fn compile_shaders() -> io::Result<()> {
|
||||||
for file_maybe in std::fs::read_dir("./shaders")? {
|
for file_maybe in std::fs::read_dir("./shaders")? {
|
||||||
let path = file_maybe?.path();
|
let path = file_maybe?.path();
|
||||||
@@ -93,6 +95,7 @@ impl DefaultShader {
|
|||||||
fn create_pipeline(device: Arc<Device>, render_pass: RP) -> GP {
|
fn create_pipeline(device: Arc<Device>, render_pass: RP) -> GP {
|
||||||
let sub_pass = Subpass::from(render_pass.clone(), 0).unwrap();
|
let sub_pass = Subpass::from(render_pass.clone(), 0).unwrap();
|
||||||
|
|
||||||
|
/*
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
{
|
{
|
||||||
println!("Compiling shaders...");
|
println!("Compiling shaders...");
|
||||||
@@ -100,7 +103,6 @@ impl DefaultShader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
/*
|
|
||||||
static ENTRY_NAME: [u8; 5usize] = [109u8, 97u8, 105u8, 110u8, 0];
|
static ENTRY_NAME: [u8; 5usize] = [109u8, 97u8, 105u8, 110u8, 0];
|
||||||
let entry_name_c = std::ffi::CStr::from_ptr(ENTRY_NAME.as_ptr() as *const _);
|
let entry_name_c = std::ffi::CStr::from_ptr(ENTRY_NAME.as_ptr() as *const _);
|
||||||
|
|
||||||
@@ -133,7 +135,7 @@ impl DefaultShader {
|
|||||||
.render_pass(sub_pass.clone())
|
.render_pass(sub_pass.clone())
|
||||||
.build(device.clone())
|
.build(device.clone())
|
||||||
.unwrap())
|
.unwrap())
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,6 +145,7 @@ impl Drawcall for DefaultShader {
|
|||||||
let game_object = &game_objects[i];
|
let game_object = &game_objects[i];
|
||||||
let mesh = &game_data.meshes[game_object.mesh_index];
|
let mesh = &game_data.meshes[game_object.mesh_index];
|
||||||
|
|
||||||
|
#[allow(irrefutable_let_patterns)]
|
||||||
if let PushConstantType::MeshPC(mesh_push) = game_object.get_push_constants() {
|
if let PushConstantType::MeshPC(mesh_push) = game_object.get_push_constants() {
|
||||||
builder
|
builder
|
||||||
.bind_pipeline_graphics(self.pipeline.clone())
|
.bind_pipeline_graphics(self.pipeline.clone())
|
||||||
@@ -281,6 +284,7 @@ impl TextShader {
|
|||||||
fn create_pipeline(device: Arc<Device>, render_pass: RP) -> GP {
|
fn create_pipeline(device: Arc<Device>, render_pass: RP) -> GP {
|
||||||
let sub_pass = Subpass::from(render_pass.clone(), 0).unwrap();
|
let sub_pass = Subpass::from(render_pass.clone(), 0).unwrap();
|
||||||
|
|
||||||
|
/*
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
{
|
{
|
||||||
println!("Compiling shaders...");
|
println!("Compiling shaders...");
|
||||||
@@ -288,7 +292,6 @@ impl TextShader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
/*
|
|
||||||
static ENTRY_NAME: [u8; 5usize] = [109u8, 97u8, 105u8, 110u8, 0];
|
static ENTRY_NAME: [u8; 5usize] = [109u8, 97u8, 105u8, 110u8, 0];
|
||||||
let entry_name_c = std::ffi::CStr::from_ptr(ENTRY_NAME.as_ptr() as *const _);
|
let entry_name_c = std::ffi::CStr::from_ptr(ENTRY_NAME.as_ptr() as *const _);
|
||||||
|
|
||||||
@@ -323,12 +326,8 @@ impl TextShader {
|
|||||||
.build(device.clone())
|
.build(device.clone())
|
||||||
.unwrap());
|
.unwrap());
|
||||||
|
|
||||||
// println!("{:?}", gp.descriptor(0, 0).unwrap().ty);
|
|
||||||
// println!("{:?}", gp.descriptor(0, 1).unwrap().ty);
|
|
||||||
// println!("{:?}", gp.descriptor(0, 2).unwrap().ty); // TODO: Why does this exist?
|
|
||||||
|
|
||||||
gp
|
gp
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user