Macro rafx::declare_render_feature
source · macro_rules! declare_render_feature { ($struct_name:ident, $atomic_constant_name:ident) => { ... }; }
Expand description
Use to declare a new render feature that can be registered. Registration allows easy global access to the render feature index from anywhere in the binary
Use like this: rafx::declare_render_feature!(Debug3DRenderFeature, DEBUG_3D_RENDER_FEATURE);
The first name is all that really matters, the second name just needs to be a constant that is exposed via the first name (i.e. Debug3DRenderFeature::feature_index())
This macro will also define the following helper functions in the same scope.
render_feature_index()
: Syntactic sugar for Debug3DRenderFeature::feature_index().render_feature_debug_name()
: Syntactic sugar for Debug3DRenderFeature::feature_debug_name().render_feature_debug_constants()
: Returns a struct containing&'static str
debug strings for the feature.