Linked picking to entities
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user