#include <volume_rendering_slabbing_shader.h>
Public Types | |
typedef math_types::real_type | real_type |
typedef math_types::vector3_type | vector3_type |
Public Member Functions | |
SlabbingShader () | |
void | init () |
bool | front2back () const |
template<typename texture2d_pointer > | |
void | pre_render (texture2d_pointer &color_table) |
template<typename tile_type > | |
void | render (tile_type const &tile) |
void | post_render () |
Protected Attributes | |
cg::Program | m_vertex_program |
cg::Program | m_fragment_program |
unsigned int | m_slice_cnt |
Number of slices per tile. | |
GLfloat | m_eye2model_matrix [16] |
The View Aligned Slabbing Shader Class.
typedef math_types::real_type OpenTissue::volume_rendering::SlabbingShader< math_types >::real_type |
typedef math_types::vector3_type OpenTissue::volume_rendering::SlabbingShader< math_types >::vector3_type |
OpenTissue::volume_rendering::SlabbingShader< math_types >::SlabbingShader | ( | ) | [inline] |
bool OpenTissue::volume_rendering::SlabbingShader< math_types >::front2back | ( | ) | const [inline] |
Front To Back Rendering.
Reimplemented from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.
void OpenTissue::volume_rendering::SlabbingShader< math_types >::init | ( | ) | [inline] |
Initialization. This method should be used to initialize internal data. For instance setting up textures (for RTT) or frame buffer objects. It could also be used for compiling and loading GPU programs.
The method should be invoked after a render context have created.
Reimplemented from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.
void OpenTissue::volume_rendering::SlabbingShader< math_types >::post_render | ( | ) | [inline] |
Post Render. This mehod is invoked after having rendered all tiles. It is usefull for cleaning up GL state or transfering rendering result to frame-buffer (for RTT).
Reimplemented from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.
void OpenTissue::volume_rendering::SlabbingShader< math_types >::pre_render | ( | texture2d_pointer & | color_table | ) | [inline] |
Pre-Render. This method prepares the rendering. This is a good place to perform common computations that need to be done for all tiles.
For instance retrieving the model-view transformation, clearing textures (for RTT) or setting GL state.
Reimplemented from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.
void OpenTissue::volume_rendering::SlabbingShader< math_types >::render | ( | tile_type const & | tile | ) | [inline] |
Renders a single tile. Note that your shader is responsible for handling any Ping-Pong schemes inbetween tiles!
Reimplemented from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.
GLfloat OpenTissue::volume_rendering::SlabbingShader< math_types >::m_eye2model_matrix[16] [protected] |
cg::Program OpenTissue::volume_rendering::SlabbingShader< math_types >::m_fragment_program [protected] |
unsigned int OpenTissue::volume_rendering::SlabbingShader< math_types >::m_slice_cnt [protected] |
Number of slices per tile.
cg::Program OpenTissue::volume_rendering::SlabbingShader< math_types >::m_vertex_program [protected] |