Restored to try anew.
This commit is contained in:
@@ -42,9 +42,6 @@
|
||||
#include "Game/CBrick.h"
|
||||
#include "Game/CPad.h"
|
||||
|
||||
#include "GUI/Frame.h"
|
||||
#include "GUI/GameFrame.h"
|
||||
|
||||
#include "Physics/PhysicsSystem.h"
|
||||
#include "Physics/CPhysics.h"
|
||||
#include "Physics/CBoxShape.h"
|
||||
|
||||
@@ -88,10 +88,6 @@ struct SpriteJob : RenderJob
|
||||
unsigned int ShaderID;
|
||||
unsigned int TextureID;
|
||||
|
||||
//Niklas is trying to get Frames to work.
|
||||
GLuint Texture;
|
||||
//Niklas is trying to get Frames to work./end
|
||||
|
||||
glm::mat4 ModelMatrix;
|
||||
GLuint DiffuseTexture;
|
||||
GLuint NormalTexture;
|
||||
|
||||
@@ -51,32 +51,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Niklas is trying to implement Frames.
|
||||
std::shared_ptr<dd::Camera> GetCamera() const { return m_FrameCamera; }
|
||||
void SetCamera(const std::shared_ptr<dd::Camera> camera)
|
||||
{
|
||||
m_FrameCamera = camera;
|
||||
}
|
||||
|
||||
void DrawFrame(RenderQueuePair &rq);
|
||||
void DrawWorld(RenderQueuePair &rq);
|
||||
|
||||
void SetViewport(const Rectangle &viewport)
|
||||
{
|
||||
m_Viewport = viewport;
|
||||
}
|
||||
|
||||
void SetScissor(const Rectangle &scissor)
|
||||
{
|
||||
m_Scissor = scissor;
|
||||
}
|
||||
|
||||
int Width() const { return m_Width; }
|
||||
int Height() const { return m_Height; }
|
||||
//Niklas is trying to implement Frames.
|
||||
|
||||
void Initialize();
|
||||
void Draw(RenderQueueCollection& rq);
|
||||
|
||||
@@ -90,14 +64,6 @@ private:
|
||||
|
||||
const dd::Camera* m_Camera = nullptr;
|
||||
|
||||
//Niklas is trying to implement Frames.
|
||||
std::shared_ptr<dd::Camera> m_FrameCamera;
|
||||
Rectangle m_Viewport;
|
||||
Rectangle m_Scissor;
|
||||
ShaderProgram m_ForwardRendering;
|
||||
int m_Width = 1980, m_Height = 1080;
|
||||
//Niklas is trying to implement Frames./end
|
||||
|
||||
int m_GLVersion[2];
|
||||
std::string m_GLVendor;
|
||||
GLFWwindow* m_Window = nullptr;
|
||||
|
||||
@@ -108,11 +108,6 @@ public:
|
||||
@param resourceName Fully qualified name of the resource to fetch.
|
||||
*/
|
||||
|
||||
//Niklas is trying to get frames to work.
|
||||
template <typename T>
|
||||
T* Load(std::string resourceType, std::string resourceName);
|
||||
//Niklas is trying to get frames to work./end
|
||||
|
||||
template <typename T>
|
||||
static T* Fetch(std::string resourceName);
|
||||
|
||||
@@ -168,25 +163,6 @@ T* ResourceManager::Load(std::string resourceName, Resource* parent /* = nullptr
|
||||
return CreateResource<T>(resourceName, parent);
|
||||
}
|
||||
|
||||
//Niklas is trying to get frames to work.
|
||||
template <typename T>
|
||||
T* ResourceManager::Load(std::string resourceType, std::string resourceName)
|
||||
{
|
||||
auto it = m_ResourceCache.find(std::make_pair(resourceType, resourceName));
|
||||
if (it != m_ResourceCache.end())
|
||||
return static_cast<T *>(it->second);
|
||||
if (m_Preloading) {
|
||||
LOG_INFO("Preloading resource \"%s\"", resourceName.c_str());
|
||||
}
|
||||
else {
|
||||
LOG_WARNING("Hot-loading resource \"%s\"", resourceName.c_str());
|
||||
}
|
||||
return static_cast<T *>(CreateResource(resourceType, resourceName));
|
||||
}
|
||||
|
||||
|
||||
//Niklas is trying to get frames to work./end
|
||||
|
||||
template <typename T>
|
||||
T* ResourceManager::Fetch(std::string resourceName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user