OGLplus  (0.59.0) a C++ wrapper for rendering APIs

to_patches.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_SHAPES_TO_PATCHES_HPP
10 #define EAGINE_SHAPES_TO_PATCHES_HPP
11 
12 #include "delegated.hpp"
13 #include <eagine/config/basic.hpp>
14 
15 namespace eagine {
16 namespace shapes {
17 //------------------------------------------------------------------------------
21 class to_patches_gen : public delegated_gen {
22 
23 public:
24  to_patches_gen(std::shared_ptr<generator> gen) noexcept
25  : delegated_gen{std::move(gen)} {}
26 
27  void instructions(drawing_variant, span<draw_operation> ops) override;
28 };
29 //------------------------------------------------------------------------------
32 static inline auto to_patches(std::shared_ptr<generator> gen) noexcept {
33  return std::make_unique<to_patches_gen>(std::move(gen));
34 }
35 //------------------------------------------------------------------------------
36 } // namespace shapes
37 } // namespace eagine
38 
39 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
40 #include <eagine/shapes/to_patches.inl>
41 #endif
42 
43 #endif // EAGINE_SHAPES_TO_PATCHES_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
span_size_t drawing_variant
Alias for shape drawing variant index type.
Definition: gen_base.hpp:31
static auto to_patches(std::shared_ptr< generator > gen) noexcept
Constructs instances of to_patches_gen modifier.
Definition: to_patches.hpp:32
Generator modifier changing primitives in draw instructions to patches.
Definition: to_patches.hpp:21
Base class for delegating shape generators based on other generators.
Definition: delegated.hpp:21
void instructions(drawing_variant, span< draw_operation > ops) override
Fetches the drawing operations for the specified drawing variant.

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).