gramods
|
The CubeMapRasterProcessor is a helper class for views that map the surrounding to a flat format. More...
#include <CubeMapRasterProcessor.hh>
Classes | |
struct | Impl |
Public Member Functions | |
void | renderFullPipeline (ViewBase::ViewSettings &settings, Eigen::Vector3f pos, Eigen::Quaternionf rot, Eye eye, bool make_square=false) |
Renders the cube map. More... | |
int | getProgram () |
Returns the shader program, for setting uniforms. More... | |
void | setFragmentCode (std::string code) |
Sets the fragment code. More... | |
void | setCubeMapResolution (int res) |
Sets the resolution of the intermediate cube map, in pixels. More... | |
void | setLinearInterpolation (bool on) |
Turn on or off linear interpolation in the projection from linear graphics to non-linear projection space. More... | |
void | setPixelFormat (GLenum format) |
Set the pixel format to use for the color buffer(s). More... | |
GLenum | getPixelFormat () |
Return the pixel format currently used for the color buffer(s). More... | |
void | setSpatialCubeMap (Eigen::Vector3f c, float side) |
Sets the position and dimensions of a spatial cube map, for example for a spatial dome rendering. More... | |
The CubeMapRasterProcessor is a helper class for views that map the surrounding to a flat format.
One call to renderFullPipeline will make up to six cube map side rendering calls to the renderers specified in the ViewSettings, as well as a final rendering through the specified fragment shader code.
GLenum gramods::gmGraphics::CubeMapRasterProcessor::getPixelFormat | ( | ) |
Return the pixel format currently used for the color buffer(s).
GLint gramods::gmGraphics::CubeMapRasterProcessor::getProgram | ( | ) |
Returns the shader program, for setting uniforms.
void gramods::gmGraphics::CubeMapRasterProcessor::renderFullPipeline | ( | ViewBase::ViewSettings & | settings, |
Eigen::Vector3f | pos, | ||
Eigen::Quaternionf | rot, | ||
Eye | eye, | ||
bool | make_square = false |
||
) |
Renders the cube map.
void gramods::gmGraphics::CubeMapRasterProcessor::setCubeMapResolution | ( | int | res | ) |
Sets the resolution of the intermediate cube map, in pixels.
Default is 2048.
void gramods::gmGraphics::CubeMapRasterProcessor::setFragmentCode | ( | std::string | code | ) |
Sets the fragment code.
void gramods::gmGraphics::CubeMapRasterProcessor::setLinearInterpolation | ( | bool | on | ) |
Turn on or off linear interpolation in the projection from linear graphics to non-linear projection space.
Default is off.
void gramods::gmGraphics::CubeMapRasterProcessor::setPixelFormat | ( | GLenum | format | ) |
Set the pixel format to use for the color buffer(s).
Default is GL_RGBA8.
void gramods::gmGraphics::CubeMapRasterProcessor::setSpatialCubeMap | ( | Eigen::Vector3f | c, |
float | side | ||
) |
Sets the position and dimensions of a spatial cube map, for example for a spatial dome rendering.