clay-core 0.1.3

Core functionality for Clay - fast, modular and extendable ray tracer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{Push, Context};


/// Something that could store its data on a device.
pub trait Store {
    /// The data that is stored on the device.
    type Data: Push;

    /// Creates device data.
    fn create_data(&self, context: &Context) -> crate::Result<Self::Data>;

    /// Updates device data.
    fn update_data(&self, context: &Context, data: &mut Self::Data) -> crate::Result<()>;
}