27 #include "glm/gtc/type_ptr.hpp" 54 glPushAttrib(GL_VIEWPORT_BIT | GL_DEPTH_BUFFER_BIT);
56 glEnable(GL_DEPTH_TEST);
57 glDepthFunc(GL_LEQUAL);
62 glMatrixMode(GL_PROJECTION);
67 glMatrixMode(GL_MODELVIEW);
72 glEnable(GL_SCISSOR_TEST);
76 glClear(GL_COLOR_BUFFER_BIT);
78 float elapsedTime = 0;
91 glDisable(GL_SCISSOR_TEST);
94 glMatrixMode(GL_PROJECTION);
96 glMatrixMode(GL_MODELVIEW);
glm::mat4 _transformation
void setDistance(float distance)
double _distance
The distance of the object from the viewer.
void add(Renderable *renderable)
Add a renderable to the sub scene.
void setProjectionMatrix(const glm::mat4 &projection)
void render(RenderPass pass)
Render the object.
void remove(Renderable *renderable)
Remove a renderable from the sub scene.
void setClearEnabled(bool clearEnabled)
The global events manager.
void calculateDistance()
Calculate the object's distance.
void setSize(int width, int height)
#define EventMan
Shortcut for accessing the events manager.
An object that can be displayed by the graphics manager.
void setGlobalTransformationMatrix(const glm::mat4 &transformation)
void setPosition(int x, int y)
The quad for displaying a subscene.
std::vector< Renderable * > _renderables