libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
moFBManager.h
Go to the documentation of this file.
1
/*******************************************************************************
2
3
moFBManager.h
4
5
****************************************************************************
6
* *
7
* This source is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* This code is distributed in the hope that it will be useful, but *
13
* WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15
* General Public License for more details. *
16
* *
17
* A copy of the GNU General Public License is available on the World *
18
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19
* obtain it by writing to the Free Software Foundation, *
20
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21
* *
22
****************************************************************************
23
24
Copyright(C) 2006 Fabricio Costa
25
26
Authors:
27
Fabricio Costa
28
Andrés Colubri
29
30
*******************************************************************************/
31
32
#ifndef __MO_FBMANAGER_H__
33
#define __MO_FBMANAGER_H__
34
35
#include "
moTypes.h
"
36
#include "
moText.h
"
37
#include "
moLock.h
"
38
#include "
moFBO.h
"
39
#include "
moTexture.h
"
40
#include "
moResourceManager.h
"
41
51
class
LIBMOLDEO_API
moFBManager
:
public
moResource
52
{
53
public
:
57
moFBManager
();
61
virtual
~
moFBManager
();
62
66
virtual
MOboolean
Init
();
70
virtual
MOboolean
Finish
();
71
76
MOuint
CreateFBO();
82
MOboolean
DeleteFBO(
MOuint
p_fbo);
87
MOuint
GetFBOCount
() {
return
m_fbo_array.Count(); }
93
moFBO
*
GetFBO
(
MOuint
p_fbo) {
return
m_fbo_array.Get(p_fbo); }
94
104
MOint
GetFBO(
MOuint
p_target,
MOuint
p_internal_format,
MOuint
p_width,
MOuint
p_height);
105
109
void
BindScreenFB();
113
void
UnbindScreenFB();
114
120
MOboolean
BindFBO(
MOuint
p_fbo);
127
MOboolean
BindFBO(
MOuint
p_fbo,
MOuint
p_attach_point);
135
MOboolean
BindFBO(
MOuint
p_fbo,
MOuint
p_num_attach_points,
MOuint
*p_attach_point_list);
136
144
MOboolean
AddTexture(
MOuint
p_fbo,
moTexture
* p_pTex,
MOuint
&p_attach_point);
152
MOboolean
AttachTexture(
MOuint
p_fbo,
moTexture
* p_pTex,
MOuint
p_attach_point);
153
159
void
SetDrawTexture(
MOuint
p_attach_point);
166
void
SetDrawTextures(
MOuint
p_num_attach_points,
MOuint
*p_attach_point_list);
172
void
SetReadTexture(
MOuint
p_attach_point);
173
182
void
SetDrawTextureByGLId(
MOuint
p_glid,
MOuint
p_width,
MOuint
p_height,
const
moTexParam
& p_param,
MOuint
p_def_attach_point = 0);
191
void
SetDrawTexturesByGLId(
MOuint
p_num_glids,
MOuint
*p_glid_list,
MOuint
p_width,
MOuint
p_height,
const
moTexParam
& p_param);
200
void
SetReadTextureByGLId(
MOuint
p_glid,
MOuint
p_width,
MOuint
p_height,
const
moTexParam
& p_param,
MOuint
p_def_attach_point = 0);
201
209
MOint
SetDrawTexture(
moTexture
* p_pTex,
MOuint
p_def_attach_point = 0);
215
MOint
SetDrawTextures(moTextureArray &p_tex_array);
223
MOint
SetReadTexture(
moTexture
* p_pTex,
MOuint
p_def_attach_point = 0);
224
229
void
UnbindFBO();
233
void
UnbindAllFBO();
234
private
:
235
moGLManager
* m_glmanager;
236
237
moFBOArray m_fbo_array;
238
239
// Index of the currently selected fbo, -1 if the screen framebuffer is binded.
240
MOint
m_current_fbo;
241
242
MOint
m_fbo_stack_index;
243
MOuint
m_fbo_stack[
MO_MAX_FBO_STACK_SIZE
];
244
MOuint
m_draw_buffer_stack[
MO_MAX_FBO_STACK_SIZE
];
245
MOuint
m_read_buffer_stack[
MO_MAX_FBO_STACK_SIZE
];
246
247
GLint m_screen_read_buffer;
248
GLint m_screen_draw_buffer;
249
250
GLenum m_color_buffers[
MO_MAX_COLOR_ATTACHMENTS_EXT
];
251
252
void
GetScreenBuffers();
253
};
254
255
#include "
moGLManager.h
"
256
257
#endif
258
moTexParam
Parámetros internos de una textura.
Definition:
moTypes.h:543
moResource
Recurso ( objeto para cargar y manipular objetos físicos de datos de imágenes, audio, video, 3d, 2d, fuentes, shaders y de cualquier otro tipo extendible por un plugin )
Definition:
moResourceManager.h:152
MOboolean
#define MOboolean
Definition:
moTypes.h:385
moFBManager
Definition:
moFBManager.h:51
moFBManager::GetFBOCount
MOuint GetFBOCount()
Definition:
moFBManager.h:87
moTypes.h
LIBMOLDEO_API
#define LIBMOLDEO_API
Definition:
moTypes.h:180
moResource::Init
virtual MOboolean Init()
Definition:
moResourceManager.cpp:64
moFBO
Definition:
moFBO.h:60
MO_MAX_COLOR_ATTACHMENTS_EXT
#define MO_MAX_COLOR_ATTACHMENTS_EXT
Definition:
moFBO.h:46
moResourceManager.h
MOint
#define MOint
Definition:
moTypes.h:388
moLock.h
moTexture
clase base para el manejo de una textura
Definition:
moTexture.h:78
moText.h
moFBManager::GetFBO
moFBO * GetFBO(MOuint p_fbo)
Definition:
moFBManager.h:93
moGLManager
manejador de operaciones comunes de Open GL
Definition:
moGLManager.h:154
moResource::Finish
virtual MOboolean Finish()
Definition:
moResourceManager.cpp:83
MO_MAX_FBO_STACK_SIZE
#define MO_MAX_FBO_STACK_SIZE
Definition:
moFBO.h:40
MOuint
#define MOuint
Definition:
moTypes.h:387
moFBO.h
moGLManager.h
moTexture.h
libmoldeo
moFBManager.h
Generated on Wed May 17 2017 14:09:17 for libmoldeo (Moldeo 1.0 Core) by
1.8.8