OpenWalnut  1.4.0
Classes | Public Member Functions | Private Member Functions | Private Attributes
WGEOffscreenTexturePass Class Reference

This class encapsulates an OSG Camera and a corresponding framebuffer object. More...

#include <WGEOffscreenTexturePass.h>

+ Inheritance diagram for WGEOffscreenTexturePass:

List of all members.

Classes

class  TextureMatrixUpdateCallback
 Callback which aligns and renders the textures. More...

Public Member Functions

 WGEOffscreenTexturePass (size_t textureWidth, size_t textureHeight, int num=0)
 Creates a new offscreen rendering instance.
 WGEOffscreenTexturePass (size_t textureWidth, size_t textureHeight, osg::ref_ptr< WGETextureHud > hud, std::string name, int num=0)
 Creates a new offscreen rendering instance.
virtual ~WGEOffscreenTexturePass ()
 Destructor.

Private Member Functions

void setup ()
 Sets the whole node up.

Private Attributes

osg::ref_ptr< osg::TexMat > m_texMat
 The texture matrix for this pass.

Detailed Description

This class encapsulates an OSG Camera and a corresponding framebuffer object.

It is a specialized variant of WGEOffscreenRenderPass, optimized for processing textures. Therefore, it creates an correctly sized quad and can process each pixel in the fragment shader.

Definition at line 41 of file WGEOffscreenTexturePass.h.


Constructor & Destructor Documentation

WGEOffscreenTexturePass::WGEOffscreenTexturePass ( size_t  textureWidth,
size_t  textureHeight,
int  num = 0 
)

Creates a new offscreen rendering instance.

Parameters:
textureWidththe width of all the textures created and used by this render pass. This should be large enough for every reasonable viewport size.
textureHeightthe height of all the textures created and used by this render pass. This should be large enough for every reasonable viewport size.*
numthe order number. This camera gets rendered at the num'th place in the pre render queue of the subgraph it is attached to.

Definition at line 32 of file WGEOffscreenTexturePass.cpp.

References setup().

WGEOffscreenTexturePass::WGEOffscreenTexturePass ( size_t  textureWidth,
size_t  textureHeight,
osg::ref_ptr< WGETextureHud hud,
std::string  name,
int  num = 0 
)

Creates a new offscreen rendering instance.

Parameters:
textureWidththe width of all the textures created and used by this render pass. This should be large enough for every reasonable viewport size.
textureHeightthe height of all the textures created and used by this render pass. This should be large enough for every reasonable viewport size.*
numthe order number. This camera gets rendered at the num'th place in the pre render queue of the subgraph it is attached to.
hudthe hud that gets notified about attached and detached textures. Useful for debugging.
namethe name of this render pass. This is a nice debugging feature in conjunction with WGETextureHud as it gets displayed there.

Definition at line 39 of file WGEOffscreenTexturePass.cpp.

References setup().

Destructor.

Definition at line 47 of file WGEOffscreenTexturePass.cpp.


Member Function Documentation

void WGEOffscreenTexturePass::setup ( ) [private]

Sets the whole node up.

Used to get some code duplication out of the constructors.

Definition at line 52 of file WGEOffscreenTexturePass.cpp.

References wge::genFinitePlane(), and m_texMat.

Referenced by WGEOffscreenTexturePass().


Member Data Documentation

osg::ref_ptr< osg::TexMat > WGEOffscreenTexturePass::m_texMat [private]

The texture matrix for this pass.

Used to scale the texture coordinates according to viewport/texture size relation.

Definition at line 83 of file WGEOffscreenTexturePass.h.

Referenced by WGEOffscreenTexturePass::TextureMatrixUpdateCallback::operator()(), and setup().


The documentation for this class was generated from the following files: