summaryrefslogtreecommitdiff
path: root/bindgen/rust/src/shader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen/rust/src/shader.rs')
-rw-r--r--bindgen/rust/src/shader.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/bindgen/rust/src/shader.rs b/bindgen/rust/src/shader.rs
new file mode 100644
index 0000000..46db1f3
--- /dev/null
+++ b/bindgen/rust/src/shader.rs
@@ -0,0 +1,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
+ }
+}