byte-engine-ghi 0.1.0

Graphics hardware interface layer used by Byte-Engine.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::borrow::Cow;

pub struct Builder<'a> {
	pub(crate) push_constant_ranges: Cow<'a, [crate::pipelines::PushConstantRange]>,
	pub(crate) shaders: Cow<'a, [crate::pipelines::ShaderParameter<'a>]>,
}

impl<'a> Builder<'a> {
	pub fn new(
		push_constant_ranges: &'a [crate::pipelines::PushConstantRange],
		shaders: &'a [crate::pipelines::ShaderParameter<'a>],
	) -> Self {
		Self {
			push_constant_ranges: Cow::Borrowed(push_constant_ranges),
			shaders: Cow::Borrowed(shaders),
		}
	}
}