blob: 46db1f3f7936036b9c17295cd25425a852b338c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
use std::{ffi::c_void, path::Path};
use celeritas_sys::ShaderData;
use crate::ral::{Pipeline, ShaderBinding};
pub struct Shader {
pipeline: Pipeline,
binding_layouts: Vec<ShaderBinding>,
}
#[no_mangle]
pub unsafe extern "C" fn rust_function(data: *mut c_void) -> celeritas_sys::ShaderDataLayout {
todo!()
}
impl Shader {
pub fn new(name: String, vs_path: &Path, fs_path: &Path) -> Self {
todo!()
}
pub fn add_layout(&mut self) -> &mut Self {
let sd = ShaderData {
get_layout: Some(rust_function),
data: std::ptr::null_mut(),
};
self
}
}
|