libs/render/src/eu/render/fullscreen.cc
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "eu/render/fullscreen.h" | ||
| 2 | |||
| 3 | #include "eu/core/geom.h" | ||
| 4 | #include "eu/core/geom.builder.h" | ||
| 5 | |||
| 6 | |||
| 7 | namespace eu::render | ||
| 8 | { | ||
| 9 | |||
| 10 | ✗ | FullScreenGeom::FullScreenGeom() | |
| 11 | { | ||
| 12 | const auto layout_shader_material = core::ShaderVertexAttributes{ | ||
| 13 | ✗ | {core::VertexType::position2xy, "a_position"}, | |
| 14 | {core::VertexType::texture2, "a_tex_coord"} | ||
| 15 | ✗ | }; | |
| 16 | ✗ | const auto layout_compiler = core::compile_attribute_layouts({layout_shader_material}); | |
| 17 | ✗ | const auto geom_layout = get_geom_layout(layout_compiler); | |
| 18 | |||
| 19 | // ndc is [-1, 1], plane func generate a centered geom, so we set our plane to a size of 2 | ||
| 20 | ✗ | constexpr auto plane_size = 2.0f; | |
| 21 | |||
| 22 | ✗ | layout = compile_shader_layout(layout_compiler, layout_shader_material, std::nullopt, std::nullopt); | |
| 23 | ✗ | geom = compile_geom( | |
| 24 | ✗ | USE_DEBUG_LABEL_MANY("full screen geom") core::geom::create_xy_plane(plane_size, plane_size, core::geom::SideCount::one_sided).to_geom(), | |
| 25 | geom_layout | ||
| 26 | ✗ | ); | |
| 27 | ✗ | } | |
| 28 | |||
| 29 | } // namespace eu::render | ||
| 30 |