2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 11:47:43 +00:00

Preparation for self-split space functionality

This commit is contained in:
Jack Andersen
2016-01-09 20:40:23 -10:00
parent 24917f2367
commit 08c4270707
18 changed files with 415 additions and 153 deletions

View File

@@ -6,7 +6,7 @@ namespace Specter
{
static LogVisor::LogModule Log("Specter::View");
void View::Resources::init(boo::GLDataFactory* factory, const ThemeData& theme)
void View::Resources::init(boo::GLDataFactory* factory, const IThemeData& theme)
{
static const char* SolidVS =
"#version 330\n"
@@ -183,7 +183,7 @@ void View::Resources::init(boo::ID3DDataFactory* factory, const ThemeData& theme
#elif BOO_HAS_METAL
void View::Resources::init(boo::MetalDataFactory* factory, const ThemeData& theme)
void View::Resources::init(boo::MetalDataFactory* factory, const IThemeData& theme)
{
static const char* SolidVS =
"#include <metal_stdlib>\n"
@@ -323,6 +323,17 @@ void View::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
m_bgVertsBinding.load(m_bgRect, sizeof(m_bgRect));
}
void View::resized(const ViewBlock& vb, const boo::SWindowRect& sub)
{
m_subRect = sub;
m_bgRect[0].m_pos.assign(0.f, sub.size[1], 0.f);
m_bgRect[1].m_pos.assign(0.f, 0.f, 0.f);
m_bgRect[2].m_pos.assign(sub.size[0], sub.size[1], 0.f);
m_bgRect[3].m_pos.assign(sub.size[0], 0.f, 0.f);
m_viewVertBlockBuf->load(&vb, sizeof(ViewBlock));
m_bgVertsBinding.load(m_bgRect, sizeof(m_bgRect));
}
void View::draw(boo::IGraphicsCommandQueue* gfxQ)
{
gfxQ->setShaderDataBinding(m_bgVertsBinding);