2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 16:06:10 +00:00

Start wiring up wgpu+winit

This commit is contained in:
2022-01-31 19:06:54 -05:00
parent 5491fd75cf
commit e48435f11e
209 changed files with 24234 additions and 8085 deletions

View File

@@ -6,10 +6,10 @@
#include "Runtime/rstl.hpp"
#include "Runtime/Graphics/CGraphics.hpp"
#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
//#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
#include <hecl/UniformBufferPool.hpp>
#include <hecl/VertexBufferPool.hpp>
//#include <hecl/UniformBufferPool.hpp>
//#include <hecl/VertexBufferPool.hpp>
#include <zeus/CColor.hpp>
#include <zeus/CVector2f.hpp>
@@ -59,22 +59,20 @@ private:
float m_lastWidth;
float m_lastW;
static rstl::reserved_vector<SDrawVertTex, 1024> g_StaticLineVertsTex;
static rstl::reserved_vector<SDrawVertNoTex, 1024> g_StaticLineVertsNoTex;
// static rstl::reserved_vector<SDrawVertTex, 1024> g_StaticLineVertsTex;
// static rstl::reserved_vector<SDrawVertNoTex, 1024> g_StaticLineVertsNoTex;
static hecl::VertexBufferPool<SDrawVertTex> s_vertPoolTex;
static hecl::VertexBufferPool<SDrawVertNoTex> s_vertPoolNoTex;
static hecl::UniformBufferPool<SDrawUniform> s_uniformPool;
// static hecl::VertexBufferPool<SDrawVertTex> s_vertPoolTex;
// static hecl::VertexBufferPool<SDrawVertNoTex> s_vertPoolNoTex;
// static hecl::UniformBufferPool<SDrawUniform> s_uniformPool;
public:
hecl::VertexBufferPool<SDrawVertTex>::Token m_vertBufTex;
hecl::VertexBufferPool<SDrawVertNoTex>::Token m_vertBufNoTex;
hecl::UniformBufferPool<SDrawUniform>::Token m_uniformBuf;
std::array<boo::ObjToken<boo::IShaderDataBinding>, 2> m_shaderBind;
// hecl::VertexBufferPool<SDrawVertTex>::Token m_vertBufTex;
// hecl::VertexBufferPool<SDrawVertNoTex>::Token m_vertBufNoTex;
// hecl::UniformBufferPool<SDrawUniform>::Token m_uniformBuf;
// std::array<boo::ObjToken<boo::IShaderDataBinding>, 2> m_shaderBind;
CLineRenderer(boo::IGraphicsDataFactory::Context& ctx, EPrimitiveMode mode, u32 maxVerts,
const boo::ObjToken<boo::ITexture>& texture, bool additive, bool zTest = false, bool zGEqual = false);
CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const boo::ObjToken<boo::ITexture>& texture, bool additive,
CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const std::shared_ptr<aurora::TextureHandle>& texture, bool additive,
bool zTest = false, bool zGEqual = false);
CLineRenderer(CLineRenderer&&) = default;
@@ -83,11 +81,11 @@ public:
const zeus::CVector2f& uv = zeus::skZero2f);
void Render(bool alphaWrite = false, const zeus::CColor& moduColor = zeus::skWhite);
static void UpdateBuffers() {
s_vertPoolTex.updateBuffers();
s_vertPoolNoTex.updateBuffers();
s_uniformPool.updateBuffers();
}
// static void UpdateBuffers() {
// s_vertPoolTex.updateBuffers();
// s_vertPoolNoTex.updateBuffers();
// s_uniformPool.updateBuffers();
// }
static void Initialize();
static void Shutdown();