GlobeEngine
DebugMap.h
Go to the documentation of this file.
1 //
2 // Grid.h
3 // GlobeEngine
4 //
5 // Created by Mathias Thöny on 27.12.11.
6 // Copyright (c) 2011 University of Zurich. All rights reserved.
7 //
8 
9 #ifndef GlobeEngine_DebugMap_h
10 #define GlobeEngine_DebugMap_h
11 
12 #include <vmmlib/matrix.hpp>
13 #include "OpenGL_Includes.h"
14 #include "DrawableComponent.h"
15 #include "Camera.h"
16 
17 namespace geUtil {
19  {
20  public:
21  DebugMap() {clear(); }
22  void create() {};
23  void create(std::shared_ptr<ge::Shader>, vmml::Vector2f _pos);
24 
25  void clear();
26  void draw(std::shared_ptr<ge::Camera> _cam, GLint _unit);
27  void draw(std::shared_ptr<ge::Camera> _cam, GLuint _texHandle, GLint _unit);
28  void update();
29 
30  void setModelViewMatrix(vmml::Matrix4d _mat);
31  void setProjectionMatrix(vmml::Matrix4d _mat);
32  void setViewport(vmml::Vector2d _viewport);
33  void setTexHandle(GLuint _texHandle);
34 
35  private:
37 
38  void setUniformsForMatrices();
39  vmml::Vector2f win_position;
40  vmml::Matrix4d viewMatrix;
41  vmml::Matrix4d projectionMatrix;
42  vmml::Vector2d viewport;
43  GLuint texHandle;
44  };
45 }
46 #endif
Definition: DrawableComponent.h:25
DebugMap()
Definition: DebugMap.h:21
void create()
Definition: DebugMap.h:22
void setTexHandle(GLuint _texHandle)
Definition: DebugMap.cpp:82
void setProjectionMatrix(vmml::Matrix4d _mat)
Definition: DebugMap.cpp:98
Definition: DebugMap.h:18
virtual void draw(std::shared_ptr< ge::Camera > _cam)
Definition: DrawableComponent.cpp:76
void draw(std::shared_ptr< ge::Camera > _cam, GLint _unit)
Definition: DebugMap.cpp:56
void setViewport(vmml::Vector2d _viewport)
Definition: DebugMap.cpp:103
void setModelViewMatrix(vmml::Matrix4d _mat)
Definition: DebugMap.cpp:93
Definition: DebugLogger.h:14
void update()
Definition: DebugMap.cpp:51
void clear()
Definition: DebugMap.cpp:4