Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
SceneFBO Class Reference

#include <SceneFBO.hpp>

Public Member Functions

 SceneFBO (Application *app, uvec2 const &size)
 
 ~SceneFBO ()
 
void draw (double time, double timeDelta)
 
void resize (vec2 const &size)
 
void readAllIds (OUT id_t *target)
 
void readIds (OUT id_t *target, uvec2 const center, uint const distance)
 
void bindSceneTexture (GLuint target=0)
 
void bindIdTexture (GLuint target=0)
 

Private Attributes

Applicationm_app
 
GLuint m_fbo
 
GLuint m_rb
 
GLuint m_texId
 
GLuint m_texScene
 
uvec2 m_size
 

Detailed Description

SceneFBO is a frame-buffer that holds the scene-buffer (color) and the id-buffer (id_t)

Definition at line 35 of file SceneFBO.hpp.

Constructor & Destructor Documentation

SceneFBO ( Application app,
uvec2 const &  size 
)

Constructs a SceneFBO-object. Creates all OpenGL-resoruces.

Parameters
appThe global application
sizeThe size of the FBO

Definition at line 4 of file SceneFBO.cpp.

~SceneFBO ( )

Descruts the SceneFBO-object

Definition at line 48 of file SceneFBO.cpp.

Member Function Documentation

void bindIdTexture ( GLuint  target = 0)

Binds the texture of the id-buffer to the given target.

Parameters
targetThe target to which the texutre will be bound

Definition at line 148 of file SceneFBO.cpp.

void bindSceneTexture ( GLuint  target = 0)

Binds the texture of the scene-buffer to the given target.

Parameters
targetThe target to which the texutre will be bound

Definition at line 153 of file SceneFBO.cpp.

void draw ( double  time,
double  timeDelta 
)

Fills the FBO by drawing the scene-graph into it.

Parameters
timeThe absolute frame-time
timeDeltaThe time since the last frame

Definition at line 56 of file SceneFBO.cpp.

void readAllIds ( OUT id_t target)

Read the id-buffer to some memory

Parameters
targetThe target memory

Definition at line 140 of file SceneFBO.cpp.

void readIds ( OUT id_t target,
uvec2 const  center,
uint const  distance 
)

Read parts of the id-buffer to some memory. Areas outside the FBO will be set to 0.

Parameters
targetThe target memory
centerThe center around which will be read
distanceThe city-block-distance to the center in which will be read

Definition at line 107 of file SceneFBO.cpp.

void resize ( vec2 const &  size)

Resizes The FBO to the given size.

Parameters
sizeThe new size of the FBO

Definition at line 73 of file SceneFBO.cpp.

Member Data Documentation

Application* m_app
private

The global application

Definition at line 37 of file SceneFBO.hpp.

GLuint m_fbo
private

The OpenGL-FBO

Definition at line 38 of file SceneFBO.hpp.

GLuint m_rb
private

The OpenGL-Renderbuffer

Definition at line 39 of file SceneFBO.hpp.

uvec2 m_size
private

The FBO-size

Definition at line 42 of file SceneFBO.hpp.

GLuint m_texId
private

The OpenGL-Texture for the id-buffer

Definition at line 40 of file SceneFBO.hpp.

GLuint m_texScene
private

The OpenGL-Texture for the scene-buffer

Definition at line 41 of file SceneFBO.hpp.


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