Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::GLProjectionOutputAttachment Class Reference

Class for extra rendering pass in GLProjection (for now only used in glutGLviewer) More...

#include <GLviewer/OutputAttachments/GLProjectionOutputAttachment.hh>

+ Inheritance diagram for BIAS::GLProjectionOutputAttachment:

Public Types

enum  GLProjectionOutputAttachmentType {
  WoWVX = 0, Haze, WoWVX2, Underwater,
  LensDistortion
}
 

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int Draw ()
 rendering second pass (for example to "screen" More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
BIAS::glfFramebufferObjectGetOutputFBO ()
 used by GLProjection to find rendering target of first pass More...
 
 GLProjectionOutputAttachment (BIAS::glfRenderTarget *out)
 constructor is given final render target (GLProjection defaults to "screen") More...
 
int InitShader (std::string vertexCode, std::string fragmentCode)
 can be called to create output attachment without having to derive new subclass will also create FBO and attached textures. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetClearColor (const BIAS::Vector4< float > &cc)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
virtual ~GLProjectionOutputAttachment ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
virtual int Draw_ ()
 
virtual int InitShader_ ()
 
int StandardDraw_ ()
 this function suffices for simple shaders that only need the standard uniforms to be set. More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
BIAS::Vector4< float > ClearColor_
 
BIAS::glfShader shaderF_
 
bool ShaderInited_
 
BIAS::glfShaderProgram shaderProg_
 
BIAS::glfShader shaderV_
 
BIAS::glfTexture2D specialDisplayDepth_
 
BIAS::glfFramebufferObject specialDisplayRenderingFBO_
 
BIAS::glfTexture2D specialDisplayTex_
 
BIAS::glfRenderTargettarget_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

Class for extra rendering pass in GLProjection (for now only used in glutGLviewer)

GLProjection will first render into FBO of this attachment and afterwards the attached shader program is executed on the result. See OutputHaze, OutputWowDisplay for examples on how to derive specialized versions

Author
fkellner

Definition at line 31 of file GLProjectionOutputAttachment.hh.

Member Enumeration Documentation

Enumerator
WoWVX 
Haze 
WoWVX2 
Underwater 
LensDistortion 

Definition at line 35 of file GLProjectionOutputAttachment.hh.

Constructor & Destructor Documentation

GLProjectionOutputAttachment::GLProjectionOutputAttachment ( BIAS::glfRenderTarget out)

constructor is given final render target (GLProjection defaults to "screen")

Definition at line 6 of file GLProjectionOutputAttachment.cpp.

GLProjectionOutputAttachment::~GLProjectionOutputAttachment ( )
virtual

Definition at line 13 of file GLProjectionOutputAttachment.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

int GLProjectionOutputAttachment::Draw ( )

rendering second pass (for example to "screen"

Definition at line 17 of file GLProjectionOutputAttachment.cpp.

virtual int BIAS::GLProjectionOutputAttachment::Draw_ ( )
inlineprotectedvirtual
int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

BIAS::glfFramebufferObject* BIAS::GLProjectionOutputAttachment::GetOutputFBO ( )
inline

used by GLProjection to find rendering target of first pass

Definition at line 48 of file GLProjectionOutputAttachment.hh.

int GLProjectionOutputAttachment::InitShader ( std::string  vertexCode,
std::string  fragmentCode 
)

can be called to create output attachment without having to derive new subclass will also create FBO and attached textures.

gl viewport information has to be already set up here.

Definition at line 25 of file GLProjectionOutputAttachment.cpp.

References BIAS::Vector4< T >::GetData(), and BIAS::Vector4< T >::Set().

Referenced by BIAS::OutputHaze::InitShader_(), BIAS::OutputWowDisplay2::InitShader_(), BIAS::OutputWowDisplay::InitShader_(), BIAS::OutputLensDistortion::InitShader_(), and BIAS::OutputUnderwater::InitShader_().

virtual int BIAS::GLProjectionOutputAttachment::InitShader_ ( )
inlineprotectedvirtual
long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void GLProjectionOutputAttachment::SetClearColor ( const BIAS::Vector4< float > &  cc)

Definition at line 70 of file GLProjectionOutputAttachment.cpp.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

int GLProjectionOutputAttachment::StandardDraw_ ( )
protected

this function suffices for simple shaders that only need the standard uniforms to be set.

these are one texture attachment, one depth attachment (the first pass render result), and their width and height

Definition at line 75 of file GLProjectionOutputAttachment.cpp.

References BIAS::Vector4< T >::GetData().

Referenced by BIAS::OutputWowDisplay2::Draw_(), BIAS::OutputWowDisplay::Draw_(), and BIAS::OutputUnderwater::Draw_().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

BIAS::Vector4<float> BIAS::GLProjectionOutputAttachment::ClearColor_
protected

Definition at line 75 of file GLProjectionOutputAttachment.hh.

Referenced by BIAS::OutputLensDistortion::Draw_().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

BIAS::glfShader BIAS::GLProjectionOutputAttachment::shaderF_
protected

Definition at line 72 of file GLProjectionOutputAttachment.hh.

bool BIAS::GLProjectionOutputAttachment::ShaderInited_
protected

Definition at line 77 of file GLProjectionOutputAttachment.hh.

BIAS::glfShaderProgram BIAS::GLProjectionOutputAttachment::shaderProg_
protected
BIAS::glfShader BIAS::GLProjectionOutputAttachment::shaderV_
protected

Definition at line 73 of file GLProjectionOutputAttachment.hh.

BIAS::glfTexture2D BIAS::GLProjectionOutputAttachment::specialDisplayDepth_
protected

Definition at line 71 of file GLProjectionOutputAttachment.hh.

Referenced by BIAS::OutputLensDistortion::Draw_().

BIAS::glfFramebufferObject BIAS::GLProjectionOutputAttachment::specialDisplayRenderingFBO_
protected

Definition at line 70 of file GLProjectionOutputAttachment.hh.

BIAS::glfTexture2D BIAS::GLProjectionOutputAttachment::specialDisplayTex_
protected

Definition at line 71 of file GLProjectionOutputAttachment.hh.

Referenced by BIAS::OutputLensDistortion::Draw_().

BIAS::glfRenderTarget* BIAS::GLProjectionOutputAttachment::target_
protected

Definition at line 69 of file GLProjectionOutputAttachment.hh.

Referenced by BIAS::OutputLensDistortion::Draw_().


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