primitive_assembly: Make use of std::array where applicable
Same behavior, minus any potential implicit array to pointer decay.
This commit is contained in:
parent
397bd1bb73
commit
e38e79e27e
|
@ -11,7 +11,7 @@ namespace Pica {
|
||||||
|
|
||||||
template <typename VertexType>
|
template <typename VertexType>
|
||||||
PrimitiveAssembler<VertexType>::PrimitiveAssembler(PipelineRegs::TriangleTopology topology)
|
PrimitiveAssembler<VertexType>::PrimitiveAssembler(PipelineRegs::TriangleTopology topology)
|
||||||
: topology(topology), buffer_index(0) {}
|
: topology(topology) {}
|
||||||
|
|
||||||
template <typename VertexType>
|
template <typename VertexType>
|
||||||
void PrimitiveAssembler<VertexType>::SubmitVertex(const VertexType& vtx,
|
void PrimitiveAssembler<VertexType>::SubmitVertex(const VertexType& vtx,
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <boost/serialization/access.hpp>
|
#include <boost/serialization/access.hpp>
|
||||||
#include "video_core/regs_pipeline.h"
|
#include "video_core/regs_pipeline.h"
|
||||||
|
@ -59,8 +60,8 @@ struct PrimitiveAssembler {
|
||||||
private:
|
private:
|
||||||
PipelineRegs::TriangleTopology topology;
|
PipelineRegs::TriangleTopology topology;
|
||||||
|
|
||||||
int buffer_index;
|
int buffer_index = 0;
|
||||||
VertexType buffer[2];
|
std::array<VertexType, 2> buffer;
|
||||||
bool strip_ready = false;
|
bool strip_ready = false;
|
||||||
bool winding = false;
|
bool winding = false;
|
||||||
|
|
||||||
|
|
Reference in New Issue