aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/draw/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stockton-render/src/draw/macros.rs')
-rw-r--r--stockton-render/src/draw/macros.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/stockton-render/src/draw/macros.rs b/stockton-render/src/draw/macros.rs
index 9096958..e1ee515 100644
--- a/stockton-render/src/draw/macros.rs
+++ b/stockton-render/src/draw/macros.rs
@@ -29,6 +29,20 @@
/// ```
/// See the hal::pso::Format enum for possible types
macro_rules! pipeline_vb_attributes {
+ // Special case for single item
+ ( $binding:expr, $firstSize:expr; $firstType:ident ) => ({
+ vec![
+ AttributeDesc {
+ location: 0,
+ binding: $binding,
+ element: Element {
+ format: Format::$firstType,
+ offset: $firstSize as u32
+ }
+ }
+ ]
+ });
+
// Start of recursion
( $binding:expr,
$firstSize:expr; $firstType:ident,
@@ -55,20 +69,6 @@ macro_rules! pipeline_vb_attributes {
vec
});
- // Special case for single item
- ( $binding:expr; $firstSize:expr; $firstType:ident ) => ({
- vec![
- AttributeDesc {
- location: 0,
- binding: $binding,
- element: Element {
- format: Format::$firstType,
- offset: $firstSize as u32
- }
- }
- ]
- });
-
// Middle of recursion
( $vec:ident; $binding:expr; $location:expr; $prevSize:expr,
$firstSize:expr; $firstType:ident,