reflect: remove explicit compile function in favour of TryFrom

This commit is contained in:
chyyran 2024-08-12 02:14:45 -04:00 committed by Ronny Chan
parent 28f5674a80
commit 45c3c876f4

View file

@ -32,12 +32,6 @@ pub struct SpirvCompilation {
pub(crate) fragment: Vec<u32>, pub(crate) fragment: Vec<u32>,
} }
impl SpirvCompilation {
/// Tries to compile SPIR-V from the provided shader source.
pub fn compile(source: &ShaderSource) -> Result<Self, ShaderCompileError> {
glslang::compile_spirv(source)
}
}
impl TryFrom<&ShaderSource> for SpirvCompilation { impl TryFrom<&ShaderSource> for SpirvCompilation {
type Error = ShaderCompileError; type Error = ShaderCompileError;