| 1 | module gfx |
| 2 | |
| 3 | // create_clear_pass_action returns a *clearing* `PassAction` that clears the `Pass` |
| 4 | // with the color defined by the color components `r`ed,`g`reen, `b`lue and `a`lpha. |
| 5 | pub fn create_clear_pass_action(r f32, g f32, b f32, a f32) PassAction { |
| 6 | mut color_action := ColorAttachmentAction{ |
| 7 | load_action: .clear |
| 8 | clear_value: Color{ |
| 9 | r: r |
| 10 | g: g |
| 11 | b: b |
| 12 | a: a |
| 13 | } |
| 14 | } |
| 15 | // color_action.set_color_values(r, g, b, a) |
| 16 | mut pass_action := PassAction{} |
| 17 | pass_action.colors[0] = color_action |
| 18 | return pass_action |
| 19 | } |
| 20 | |