Vis 2 Demo
1.0
Technical illustration type real-time rendering of geometry
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Macros
src
visualisation
FramebufferObject.h
Go to the documentation of this file.
1
#ifndef __FRAME_BUFFER_OBJECT_H__
2
#define __FRAME_BUFFER_OBJECT_H__
3
4
#include <glew.h>
5
#include <iostream>
6
#include "
Texture.h
"
7
8
#define VIS2_FBO_SETUP_SUCCESS 0
9
#define VIS2_FBO_SETUP_FAIL -1
10
11
namespace
vis2
12
{
14
18
class
FramebufferObject
19
{
20
public
:
22
28
FramebufferObject
(
const
unsigned
int
_vp_width,
const
unsigned
int
_vp_height,
const
bool
_color_only);
29
31
34
~FramebufferObject
();
35
37
40
inline
unsigned
int
getFBOStatus
()
const
{
return
fbo_status
; }
41
43
49
void
bindFramebufferObject
(
const
float
_r,
const
float
_g,
const
float
_b,
const
float
_a);
50
52
56
void
releaseFramebufferObject
();
57
59
inline
Texture
*
getFBOColorTexture
() {
return
fbo_color_texture
;}
61
inline
Texture
*
getFBODepthTexture
() {
return
fbo_depth_texture
;}
62
63
private
:
65
FramebufferObject
(
const
FramebufferObject
&);
66
67
bool
color_only
;
68
69
GLuint
fbo_handle
;
70
bool
fbo_setup_done
;
71
unsigned
int
fbo_status
;
72
unsigned
int
fbo_width
;
73
unsigned
int
fbo_height
;
74
GLuint
fbo_renderbuffer_color_handle
;
75
GLuint
fbo_renderbuffer_depth_handle
;
76
Texture
*
fbo_color_texture
;
77
Texture
*
fbo_depth_texture
;
78
79
};
80
}
81
82
83
84
#endif
Generated on Tue Jun 11 2013 08:43:14 for Vis 2 Demo by
1.8.3.1