1mod color;
2mod lines;
3mod noise_texture;
4mod shader;
5
6pub use color::*;
7pub use lines::*;
8pub use noise_texture::*;
9pub use shader::*;
10
11#[derive(Debug)]
12pub enum GraphicsError {
13 ShaderError(ShaderError),
14 GraphicsError(solstice::GraphicsError),
15}
16
17impl std::fmt::Display for GraphicsError {
18 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
19 write!(f, "{:?}", self)
20 }
21}
22
23impl std::error::Error for GraphicsError {}
24
25impl From<solstice::GraphicsError> for GraphicsError {
26 fn from(err: solstice::GraphicsError) -> Self {
27 GraphicsError::GraphicsError(err)
28 }
29}
30
31impl From<ShaderError> for GraphicsError {
32 fn from(err: ShaderError) -> Self {
33 GraphicsError::ShaderError(err)
34 }
35}