/// Structure returned by [`glsl_scalar`] /// /// It contains both a prefix used in other types and the full type name pub(incrate::back::glsl) struct ScalarString<'a> { /// The prefix used to compose other types pub prefix: &'a str, /// The name of the scalar type pub full: &'a str,
}
/// Helper function that returns scalar related strings /// /// Check [`ScalarString`] for the information provided /// /// # Errors /// If a [`Float`](crate::ScalarKind::Float) with an width that isn't 4 or 8 pub(incrate::back::glsl) constfn glsl_scalar(
scalar: crate::Scalar,
) -> Result<ScalarString<'static>, Error> { usecrate::ScalarKind as Sk;
/// Helper function that returns the glsl variable name for a builtin pub(incrate::back::glsl) constfn glsl_built_in(
built_in: crate::BuiltIn,
options: VaryingOptions,
) -> &'static str { usecrate::BuiltIn as Bi;
/// Helper function that returns the string corresponding to the address space pub(incrate::back::glsl) constfn glsl_storage_qualifier(
space: crate::AddressSpace,
) -> Option<&'static str> { usecrate::AddressSpace asAs;
/// Helper function that returns the string corresponding to the glsl interpolation qualifier pub(incrate::back::glsl) constfn glsl_interpolation(
interpolation: crate::Interpolation,
) -> &'static str { usecrate::Interpolation as I;
/// Return the GLSL auxiliary qualifier for the given sampling value. pub(incrate::back::glsl) constfn glsl_sampling(
sampling: crate::Sampling,
) -> BackendResult<Option<&'static str>> { usecrate::Sampling as S;
/// Helper function that returns the glsl dimension string of [`ImageDimension`](crate::ImageDimension) pub(incrate::back::glsl) constfn glsl_dimension(dim: crate::ImageDimension) -> &yle='color:blue'>'static str { usecrate::ImageDimension as IDim;
match dim {
IDim::D1 => "1D",
IDim::D2 => "2D",
IDim::D3 => "3D",
IDim::Cube => "Cube",
}
}
/// Helper function that returns the glsl storage format string of [`StorageFormat`](crate::StorageFormat) pub(incrate::back::glsl) fn glsl_storage_format(
format: crate::StorageFormat,
) -> Result<&'static str, Error> { usecrate::StorageFormat as Sf;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.