GPU-Accelerated Coverage
0.1.0
Compute coverage tours for known environment with articulated objects on GPU
|
Renderer for rendering a 3D scene using textures and materials. More...
#include <Renderer.h>
Public Member Functions | |
Renderer (const Scene *const scene, const bool renderToWindow, const bool renderToTexture) | |
Constructor. More... | |
virtual | ~Renderer () |
Destructor. | |
virtual void | display () |
Renders the scene. More... | |
const GLuint & | getTexture () const |
Returns the OpenGL texture ID of the result texture. More... | |
const int & | getTextureHeight () const |
Height of the result texture. More... | |
const int & | getTextureWidth () const |
Width of the result texture. More... | |
void | setCamera (CameraPerspective *cameraNew) |
Change the active camera used for rendering. More... | |
![]() | |
AbstractRenderer (const Scene *const scene, const std::string &name) | |
Constructor. More... | |
virtual | ~AbstractRenderer () |
Destructor. | |
const bool & | isReady () const |
Returns true if the renderer has been initialized correctly. More... | |
const std::string & | getName () const |
Returns the name of the renderer for logging purposes. More... | |
Protected Types | |
enum | TextureRole { COLOR = 0, DEPTH = 1 } |
Texture roles. More... | |
Protected Attributes | |
const bool | renderToWindow |
True if renderer should render to the window framebufer. | |
const bool | renderToTexture |
True if renderer should render to an off-screen texture. | |
const int | width |
Width of the off-screen texture in pixels. | |
const int | height |
Height of the off-screen texture in pixels. | |
CameraPerspective * | camera |
Active camera used for rendering. | |
ProgramVisualTexture | progVisualTexture |
Shader program for rendering a mesh with materials and/or textures. | |
ProgramVisualVertexcolor | progVisualVertexcolor |
Shader program for rendering a mesh with per-vertex colors. | |
ProgramShowTexture * | progShowTexture |
Program for rendering a texture to a framebuffer. | |
CoordinateAxes | coordinateAxes |
Coordinate axes scene object. | |
GLuint | framebuffer |
Framebuffer for offscreen rendering. | |
GLuint | textures [2] |
Color and depth textures for offscreen rendering. | |
GLuint | vao |
Vertex array object. | |
GLuint | vbo |
Vertex buffer object. | |
![]() | |
const Scene *const | scene |
Pointer to the scene to be rendered. | |
const std::string | name |
Name of the renderer, see getName(). | |
bool | ready |
Set to true when renderer is ready, see isReady(). | |
Renderer for rendering a 3D scene using textures and materials.
|
protected |
Texture roles.
Enumerator | |
---|---|
COLOR |
Color buffer. |
DEPTH |
Depth buffer. |
gpu_coverage::Renderer::Renderer | ( | const Scene *const | scene, |
const bool | renderToWindow, | ||
const bool | renderToTexture | ||
) |
Constructor.
scene | The scene to be rendered. |
renderToWindow | True if scene should be rendered to the window framebuffer. |
renderToTexture | True if scene should be rendered off-screen to texture. |
It is possible to render to both the window framebuffer and off-screen to texture.
|
virtual |
Renders the scene.
This method does the main work of the renderer.
Implements gpu_coverage::AbstractRenderer.
|
inlinevirtual |
Returns the OpenGL texture ID of the result texture.
Implements gpu_coverage::AbstractRenderer.
|
inlinevirtual |
|
inlinevirtual |
|
inline |
Change the active camera used for rendering.
cameraNew | The new camera. |