mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 05:47:42 +00:00
Implement line renderer (OpenGL only for now)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "Space.hpp"
|
||||
|
||||
#include "Runtime/Particle/CElementGen.hpp"
|
||||
#include "Runtime/Graphics/CLineRenderer.hpp"
|
||||
|
||||
namespace URDE
|
||||
{
|
||||
@@ -39,24 +40,13 @@ class ViewManager : public Specter::IViewManager
|
||||
public:
|
||||
ParticleView(ViewManager& vm, Specter::ViewResources& res, Specter::View& parent)
|
||||
: View(res, parent), m_vm(vm) {}
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ)
|
||||
{
|
||||
if (m_vm.m_partGen)
|
||||
{
|
||||
m_vm.m_partGen->Update(1.0 / 60.0);
|
||||
pshag::CGraphics::SetModelMatrix(Zeus::CTransform::Identity());
|
||||
pshag::CGraphics::SetViewPointMatrix(Zeus::CTransform::Identity() + Zeus::CVector3f(0.f, -10.f, 0.f));
|
||||
boo::SWindowRect windowRect = m_vm.m_mainWindow->getWindowFrame();
|
||||
float aspect = windowRect.size[0] / float(windowRect.size[1]);
|
||||
pshag::CGraphics::SetPerspective(55.0, aspect, 0.001f, 1000.f);
|
||||
//gfxQ->clearTarget(false, true);
|
||||
m_vm.m_partGen->Render();
|
||||
}
|
||||
}
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
};
|
||||
std::unique_ptr<ParticleView> m_particleView;
|
||||
pshag::TLockedToken<pshag::CGenDescription> m_partGenDesc;
|
||||
std::unique_ptr<pshag::CElementGen> m_partGen;
|
||||
std::unique_ptr<pshag::CLineRenderer> m_lineRenderer;
|
||||
|
||||
HECL::SystemString m_recentProjectsPath;
|
||||
std::vector<HECL::SystemString> m_recentProjects;
|
||||
|
||||
Reference in New Issue
Block a user