2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 13:07:43 +00:00

Graphics/Shaders: Use std::array where applicable

Makes the arrays strongly typed and impervious to array->pointer decay.
This also allows simplifying some operations (such as being able to call
fill() instead of needing to use std::fill, etc).
This commit is contained in:
Lioncash
2019-09-28 22:22:12 -04:00
parent 417506572c
commit 136a229a1a
36 changed files with 530 additions and 347 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include <array>
#include <cstddef>
#include <vector>
@@ -16,7 +17,7 @@ namespace urde {
class CFogVolumePlaneShader {
boo::ObjToken<boo::IGraphicsBufferD> m_vbo;
boo::ObjToken<boo::IShaderDataBinding> m_dataBinds[4];
std::array<boo::ObjToken<boo::IShaderDataBinding>, 4> m_dataBinds;
std::vector<zeus::CVector4f> m_verts;
size_t m_vertCapacity = 0;