Renderer¶
-
struct
glen::Renderer¶ Main entry point for rendering content.
Public Functions
-
Renderer(CameraNode *camera, const glm::uvec2 &dimensions)¶ Constructor.
- Parameters
camera: The main viewing camera.dimensions: The window dimensions.
-
bool
poll_events()¶ - Return
False if window has received ‘quit’ command.
-
void
add_node(Node *node)¶ Add a
Nodeto the renderer.Nodes must be added to the renderer in order for them to appear in the window.
-
void
enable_post_effects()¶ Enable all post process effects (tone mapping, glow, etc.)
-
void
disable_post_effects()¶ Disable all post process effects (tone mapping, glow, etc.)
-
void
enable_deferred_render()¶ Enable deferred rendering.
Requires that mesh nodes havea
GBufferMaterialapplied.
-
void
disable_deferred_render()¶ Disable deferred rendering.
-
void
enable_ao()¶ Enable ambient occlusion.
Ambient occlusion is a post processing effect that adds soft contact shadows to the render.
-
void
disable_ao()¶ Disable ambient occlusion.
-
Window¶
-
struct
glen::Window¶ A Window object sets up an OpenGL environment for all other components.
A new window must be constructed before any other components are added to the scene.
Public Functions
-
Window(std::string name, GLuint width, GLuint height)¶ Constructor.
-
Window(std::string name, std::vector<OpenGLAttrPair> st_config, GLuint width, GLuint height)¶ Constructor.
-
~Window()¶
-
void
append_title(std::string str)¶ The window title will appear as <Window name>=””> |
str- Parameters
str: Add this string to the window name.
-
void
finish_frame()¶ Swap the old frame with the newly created frame.
-
GLint
width()¶ - Return
The window width in pixels.
-
GLint
height()¶ - Return
The window height in pixels.
-