Basic Image AlgorithmS Library 2.8.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

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:
Collaboration diagram for BIAS::GLProjectionOutputAttachment:

List of all members.

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 std::string &name) const
bool DebugLevelIsSet (const long int lv) const
int Draw ()
 rendering second pass (for example to "screen"
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
 GLProjectionOutputAttachment (BIAS::glfRenderTarget *out)
 constructor is given final render target (GLProjection defaults to "screen")
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.
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel
void PrintDebugLevel (std::ostream &os=std::cout) const
void RemoveDebugLevel (const std::string &name)
void RemoveDebugLevel (const long int lv)
void SetClearColor (const BIAS::Vector4< float > &cc)
void SetDebugLevel (const std::string &name)
void SetDebugLevel (const long int lv)
void SetDebugStream (const std::ostream &os)
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels
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
virtual int Draw_ ()
virtual int InitShader_ ()
int StandardDraw_ ()
 this function suffices for simple shaders that only need the standard uniforms to be set.

Protected Attributes

long int _liDebugLevel
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class
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) [inline, inherited]
void BIAS::Debug::AddDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 363 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( ) [inline, protected, inherited]

returns the next available debuglevel

Author:
woelk 09/2006

Definition at line 522 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const [inline, inherited]

Definition at line 351 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const [inline, inherited]
int GLProjectionOutputAttachment::Draw ( )

rendering second pass (for example to "screen"

Definition at line 17 of file GLProjectionOutputAttachment.cpp.

virtual int BIAS::GLProjectionOutputAttachment::Draw_ ( ) [inline, protected, virtual]
int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]
std::ostream& BIAS::Debug::GetDebugStream ( ) const [inline, inherited]

Definition at line 406 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const [inline, inherited]

Definition at line 415 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 432 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::OutputWowDisplay2::InitShader_(), BIAS::OutputWowDisplay::InitShader_(), BIAS::OutputUnderwater::InitShader_(), BIAS::OutputLensDistortion::InitShader_(), and BIAS::OutputHaze::InitShader_().

virtual int BIAS::GLProjectionOutputAttachment::InitShader_ ( ) [inline, protected, virtual]
long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const [inline, inherited]

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

Author:
woelk 09/2006

Definition at line 455 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name) [inline, inherited]
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

Definition at line 384 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 377 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv) [inline, inherited]

Definition at line 370 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 std::string &  name) [inline, inherited]

Definition at line 326 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::SetDebugStream ( const std::ostream &  os) [inline, inherited]

Definition at line 399 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev) [inline, static, inherited]

Definition at line 425 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

prints all internally known debuglevels

Author:
woelk 09/2006

Definition at line 497 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 [protected, inherited]

Definition at line 511 of file Debug.hh.

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

long int BIAS::Debug::_liNextDebugLevel [protected, inherited]

new concept, debuglevel are managed here in the debug class

Definition at line 517 of file Debug.hh.

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

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel [protected, inherited]

Definition at line 518 of file Debug.hh.

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

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 512 of file Debug.hh.

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

Definition at line 75 of file GLProjectionOutputAttachment.hh.

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

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 514 of file Debug.hh.

Definition at line 72 of file GLProjectionOutputAttachment.hh.

Definition at line 77 of file GLProjectionOutputAttachment.hh.

Definition at line 73 of file GLProjectionOutputAttachment.hh.

Definition at line 71 of file GLProjectionOutputAttachment.hh.

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

Definition at line 70 of file GLProjectionOutputAttachment.hh.

Definition at line 71 of file GLProjectionOutputAttachment.hh.

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

Definition at line 69 of file GLProjectionOutputAttachment.hh.

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


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends