Linked picking to entities

This commit is contained in:
viktorljung
2015-12-07 17:26:42 +01:00
parent 9c589a0dc6
commit 9e1a4b83ae
4 changed files with 14 additions and 4 deletions
+4
View File
@@ -7,6 +7,7 @@
#include "../Common.h"
#include "../GLM.h"
#include "../Core/Util/Rectangle.h"
#include "../Core/EntityWrapper.h"
class Model;
class Skeleton;
@@ -37,6 +38,9 @@ struct ModelJob : RenderJob
unsigned int ShaderID = 0;
unsigned int TextureID = 0;
//TODO: RENDERER: Not sure if the best solution for pickingColor to entity link is this
EntityID Entity;
glm::mat4 ModelMatrix;
const Texture* DiffuseTexture;
const Texture* NormalTexture;
+2 -1
View File
@@ -9,6 +9,7 @@
#include "../Core/ResourceManager.h"
#include "Util/UnorderedMapVec2.h"
#include "Util/FrameBuffer.h"
#include "../Core/World.h"
class Renderer : public IRenderer
{
@@ -32,7 +33,7 @@ private:
std::unordered_map<glm::vec2, const Model*> m_PickingColorsToModels;
std::unordered_map<glm::vec2, EntityID> m_PickingColorsToEntity;
//----------------------Functions----------------------//
void InitializeWindow();