metaforce/Editor/ModelViewer.cpp

26 lines
741 B
C++
Raw Normal View History

2016-02-18 08:56:11 +00:00
#include "ModelViewer.hpp"
2016-03-05 00:03:41 +00:00
namespace urde
2016-02-18 08:56:11 +00:00
{
void ModelViewer::View::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
{
2016-03-04 23:04:53 +00:00
specter::View::resized(root, sub);
2016-02-18 08:56:11 +00:00
m_scissorRect = sub;
}
void ModelViewer::View::draw(boo::IGraphicsCommandQueue* gfxQ)
{
gfxQ->setScissor(m_scissorRect);
m_mv.m_lineRenderer->Reset();
2016-03-04 23:04:53 +00:00
m_mv.m_lineRenderer->AddVertex({-0.5f, 0.f, -0.5f}, zeus::CColor::skBlue, 1.f);
m_mv.m_lineRenderer->AddVertex({-0.5f, 0.f, 0.5f}, zeus::CColor::skBlue, 1.f);
m_mv.m_lineRenderer->AddVertex({0.5f, 10.f, 0.5f}, zeus::CColor::skRed, 3.f);
m_mv.m_lineRenderer->AddVertex({0.5f, 0.f, -0.5f}, zeus::CColor::skBlue, 1.f);
2016-02-18 08:56:11 +00:00
m_mv.m_lineRenderer->Render();
gfxQ->setScissor({});
}
}