Picking now returning world position

This commit is contained in:
viktorljung
2015-12-03 14:50:14 +01:00
parent 18b63c7ef3
commit 983ca485f5
3 changed files with 51 additions and 10 deletions
+6 -4
View File
@@ -46,10 +46,7 @@ public:
float FarClip() const { return m_FarClip; }
void SetFarClip(float val);
float m_AspectRatio;
float m_FOV;
float m_NearClip;
float m_FarClip;
private:
void UpdateViewMatrix();
@@ -60,6 +57,11 @@ private:
glm::mat4 m_ProjectionMatrix;
glm::mat4 m_ViewMatrix;
float m_AspectRatio;
float m_FOV;
float m_NearClip;
float m_FarClip;
};
#endif
+5
View File
@@ -52,6 +52,11 @@ private:
void DrawScreenQuad(GLuint textureToDraw);
glm::vec3 GetClickedPixelData(float x, float y);
void DrawScene(RenderQueueCollection& rq);
//--------------------Utility functions----------------//
glm::vec3 ScreenCoordsToWorldPos(glm::vec2 screenCoord, float depth);
//EntityID ScreenCoordsToEntityID(glm::vec2 screenCoord, float depth);
//--------------------ShaderPrograms-------------------//
ShaderProgram m_BasicForwardProgram;
ShaderProgram m_PickingProgram;