Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Framebuffer32F.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2016 "Omnidome" by cr8tr
2  * Dome Mapping Projection Software (http://omnido.me).
3  * Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4  *
5  * This file is part of Omnidome.
6  *
7  * Omnidome is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Affero General Public License for more details.
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OMNI_VISUAL_FRAMEBUFFER32F_H_
20 #define OMNI_VISUAL_FRAMEBUFFER32F_H_
21 
22 #include <omni/visual/util.h>
23 
24 namespace omni {
25  namespace visual {
26  /// Framebuffer with 32-bit float pixel depth per channel
28  public:
30  Framebuffer32F(QSize const&);
32 
33  /// Return width of framebuffer
34  int width() const;
35 
36  /// Return height of framebuffer
37  int height() const;
38 
39  /// Return size of framebuffer
40  QSize const& size() const;
41 
42  void initialize(QSize const&);
43 
44  GLuint texture() const;
45 
46  void bind();
47 
48  void release();
49 
50  /// Free buffer from current context
51  void destroy();
52 
53  private:
54 
55  QSize size_;
56  GLuint fb_ = 0;
57  GLuint colorTex_ = 0;
58  GLuint depthRb_ = 0;
59  };
60  }
61 }
62 
63 #endif /* OMNI_VISUAL_FRAMEBUFFER32F_H_ */
void release()
Definition: Framebuffer32F.cpp:109
GLuint texture() const
Definition: Framebuffer32F.cpp:115
void destroy()
Free buffer from current context.
Definition: Framebuffer32F.cpp:94
Framebuffer32F()
Definition: Framebuffer32F.cpp:26
int width() const
Return width of framebuffer.
Definition: Framebuffer32F.cpp:119
QSize size_
Definition: Framebuffer32F.h:55
GLuint colorTex_
Definition: Framebuffer32F.h:57
GLuint fb_
Definition: Framebuffer32F.h:56
QSize const & size() const
Return size of framebuffer.
Definition: Framebuffer32F.cpp:128
~Framebuffer32F()
Definition: Framebuffer32F.cpp:33
Framebuffer with 32-bit float pixel depth per channel.
Definition: Framebuffer32F.h:27
int height() const
Return height of framebuffer.
Definition: Framebuffer32F.cpp:123
GLuint depthRb_
Definition: Framebuffer32F.h:58
void initialize(QSize const &)
Definition: Framebuffer32F.cpp:37
void bind()
Definition: Framebuffer32F.cpp:103