Viewports fixed. Damage HUD. Free steering fixed.

This commit is contained in:
2014-05-28 20:22:38 +02:00
parent f813f8d2ca
commit cc42b94000
18 changed files with 744 additions and 1132 deletions
+13 -4
View File
@@ -11,7 +11,10 @@ class TextureFrame : public Frame
{
public:
TextureFrame(Frame* parent, std::string name)
: Frame(parent, name) { }
: Frame(parent, name)
, m_Texture(nullptr)
, m_Color(glm::vec4(1.f, 1.f, 1.f, 1.f))
{ }
void Draw(std::shared_ptr<Renderer> renderer) override
{
@@ -22,20 +25,26 @@ public:
SpriteJob job;
job.TextureID = m_Texture->ResourceID;
job.Texture = *m_Texture;
job.Color = m_Color;
RenderQueue.Add(job);
renderer->SetCamera(nullptr);
renderer->DrawFrame(RenderQueue);
}
std::shared_ptr<::Texture> Texture() const { return m_Texture; }
::Texture* Texture() const { return m_Texture; }
void SetTexture(std::string resourceName)
{
m_Texture = std::shared_ptr<::Texture>(ResourceManager->Load<::Texture>("Texture", resourceName));
m_Texture = ResourceManager->Load<::Texture>("Texture", resourceName);
}
glm::vec4 Color() const { return m_Color; }
void SetColor(glm::vec4 val) { m_Color = val; }
protected:
std::shared_ptr<::Texture> m_Texture;
::Texture* m_Texture;
glm::vec4 m_Color;
};
}