Renders a scene with an alternating black and white region style, using the stencil buffer to count primitives covering each pixel.
More...
#include <StenciledRenderer.hpp>
|
|
Texture | _sceneColor |
| | Scene color texture.
|
| |
|
Texture | _sceneDepth |
| | Scene depth texture.
|
| |
|
std::shared_ptr< Scene > | _scene |
| | The scene to render.
|
| |
|
Program * | _objectProgram |
| | Basic stencil program.
|
| |
|
Program * | _fillProgram |
| | Final screen filling.
|
| |
|
|
std::string | _name |
| | Debug name.
|
| |
|
Layout | _colorFormat = Layout::NONE |
| | The preferred output format for a given renderer.
|
| |
|
Layout | _depthFormat = Layout::NONE |
| | The preferred output format for a given renderer.
|
| |
Renders a scene with an alternating black and white region style, using the stencil buffer to count primitives covering each pixel.
Inherits Renderer.
◆ StenciledRenderer()
| StenciledRenderer::StenciledRenderer |
( |
const glm::vec2 & |
resolution | ) |
|
|
explicit |
Constructor.
- Parameters
-
| resolution | the initial rendering resolution |
◆ draw()
| void StenciledRenderer::draw |
( |
const Camera & |
camera, |
|
|
Texture * |
dstColor, |
|
|
Texture * |
dstDepth, |
|
|
uint |
layer = 0 |
|
) |
| |
|
overridevirtual |
Draw from a given viewpoint.
- Parameters
-
| camera | the rendering viewpoint |
| dstColor | the destination color texture (optional, see outputColorFormat) |
| dstDepth | the destination depth texture (optional, see outputDepthFormat) |
| layer | the layer to write to in the target |
Reimplemented from Renderer.
◆ resize()
| void StenciledRenderer::resize |
( |
uint |
width, |
|
|
uint |
height |
|
) |
| |
|
overridevirtual |
Handle a window resize event.
- Parameters
-
| width | the new width |
| height | the new height |
Reimplemented from Renderer.
◆ setScene()
| void StenciledRenderer::setScene |
( |
const std::shared_ptr< Scene > & |
scene | ) |
|
Set the scene to render.
- Parameters
-
The documentation for this class was generated from the following files: