|
Realtime Fractal Renderer Documentation
|
The renderer of the application, responsible for calculating the colour for each pixel in the window. More...
#include <Renderer.h>

Public Member Functions | |
| Renderer (uint32_t width, uint32_t height, std::ostream &log) | |
| ~Renderer () | |
| void | render (const Camera &camera, double time) |
| Renders the camera's view of the current scene to the colour buffer. More... | |
| Scene | load_scene (std::string scene_kernel_path, std::string build_options, size_t work_group_size) |
| Attempts to load the scene from the specified kernel .cl path. More... | |
| void | save_screenshot (std::string path) |
| Saves the contents of the colour buffer to a ppm format image, at the specified path. More... | |
| DeviceStats | getDeviceData () |
| size_t | getWorkGroupSize () |
Data Fields | |
| uint8_t * | buffer |
| A buffer containing the most recent RGBA 0-255 colours. Array has capacity width x height. More... | |
The renderer of the application, responsible for calculating the colour for each pixel in the window.
Definition at line 32 of file Renderer.h.
| Renderer | ( | uint32_t | width, |
| uint32_t | height, | ||
| std::ostream & | log | ||
| ) |
Definition at line 12 of file Renderer.cpp.
| ~Renderer | ( | ) |
Definition at line 23 of file Renderer.cpp.
| DeviceStats getDeviceData | ( | ) |
Definition at line 107 of file Renderer.cpp.
|
inline |
Definition at line 69 of file Renderer.h.
| Scene load_scene | ( | std::string | scene_kernel_path, |
| std::string | build_options, | ||
| size_t | work_group_size | ||
| ) |
Attempts to load the scene from the specified kernel .cl path.
| scene_kernel_path | A path relative to the current directory for the the scene .cl kernel file |
| build_options | Options to be passed to the OpenCL compiler. Check the OpenCL C++ wrapper documentation for a full list of options |
| work_group_size | Desired group size when distrubuting work over the GPU |
Definition at line 300 of file Renderer.cpp.
| void render | ( | const Camera & | camera, |
| double | time | ||
| ) |
Renders the camera's view of the current scene to the colour buffer.
| camera | A camera viewing the current scene |
| time | The current time since creation for the scene |
Definition at line 386 of file Renderer.cpp.
| void save_screenshot | ( | std::string | path | ) |
Saves the contents of the colour buffer to a ppm format image, at the specified path.
| path | A valid path for the image to be created at. It must use already existing directories. |
Definition at line 444 of file Renderer.cpp.
| uint8_t* buffer |
A buffer containing the most recent RGBA 0-255 colours. Array has capacity width x height.
Definition at line 48 of file Renderer.h.