diff options
| author | 2017-01-27 18:10:54 -0800 | |
|---|---|---|
| committer | 2017-01-29 21:31:38 -0800 | |
| commit | 37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0 (patch) | |
| tree | ea34825c27519d42b6f9ec82cdccafb49815a89b /src/video_core/primitive_assembly.h | |
| parent | VideoCore: Extract swrast-specific data from OutputVertex (diff) | |
| download | yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.gz yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.xz yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.zip | |
VideoCore: Make PrimitiveAssembler const-correct
Diffstat (limited to 'src/video_core/primitive_assembly.h')
| -rw-r--r-- | src/video_core/primitive_assembly.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/primitive_assembly.h b/src/video_core/primitive_assembly.h index 0384d5984..24da47382 100644 --- a/src/video_core/primitive_assembly.h +++ b/src/video_core/primitive_assembly.h | |||
| @@ -15,7 +15,8 @@ namespace Pica { | |||
| 15 | */ | 15 | */ |
| 16 | template <typename VertexType> | 16 | template <typename VertexType> |
| 17 | struct PrimitiveAssembler { | 17 | struct PrimitiveAssembler { |
| 18 | using TriangleHandler = std::function<void(VertexType& v0, VertexType& v1, VertexType& v2)>; | 18 | using TriangleHandler = |
| 19 | std::function<void(const VertexType& v0, const VertexType& v1, const VertexType& v2)>; | ||
| 19 | 20 | ||
| 20 | PrimitiveAssembler(Regs::TriangleTopology topology = Regs::TriangleTopology::List); | 21 | PrimitiveAssembler(Regs::TriangleTopology topology = Regs::TriangleTopology::List); |
| 21 | 22 | ||
| @@ -25,7 +26,7 @@ struct PrimitiveAssembler { | |||
| 25 | * NOTE: We could specify the triangle handler in the constructor, but this way we can | 26 | * NOTE: We could specify the triangle handler in the constructor, but this way we can |
| 26 | * keep event and handler code next to each other. | 27 | * keep event and handler code next to each other. |
| 27 | */ | 28 | */ |
| 28 | void SubmitVertex(VertexType& vtx, TriangleHandler triangle_handler); | 29 | void SubmitVertex(const VertexType& vtx, TriangleHandler triangle_handler); |
| 29 | 30 | ||
| 30 | /** | 31 | /** |
| 31 | * Resets the internal state of the PrimitiveAssembler. | 32 | * Resets the internal state of the PrimitiveAssembler. |