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.
|
#include <moTextureFilter.h>
Public Member Functions | |
moTextureFilter () | |
virtual | ~moTextureFilter () |
virtual MOboolean | Init (moGLManager *p_glman, moRenderManager *p_renderman, moTextureArray &p_src_tex, moTextureArray &p_dest_tex, moShader *p_shader, const moTextFilterParam &p_params) |
virtual MOboolean | Finish () |
void | Apply (MOuint p_i, MOfloat p_fade, const moTextFilterParam &p_params) |
void | Apply (MOuint p_i) |
void | Apply (MOfloat p_cycle, MOfloat p_fade, const moTextFilterParam &p_params) |
void | Apply (MOfloat p_cycle) |
void | Apply (moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam &p_params) |
void | Apply (moTempo *p_tempo) |
void | Apply (moMoldeoObject *p_src_mob, MOfloat p_fade, const moTextFilterParam &p_params) |
void | Apply (moMoldeoObject *p_src_mob, moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam &p_params) |
void | Apply (moMoldeoObject *p_src_mob) |
moTextureIndex * | GetSrcTex () |
moTextureIndex * | GetDestTex () |
moShader * | GetShader () |
void | CheckDestTexAttachStatus () |
void | SetTextureFilterLabelName (moText p_text) |
moText | GetTextureFilterLabelName () |
const moTextFilterParam & | GetTextFilterParam () |
Public Member Functions inherited from moAbstract | |
moAbstract () | |
virtual | ~moAbstract () |
virtual MOboolean | Init () |
Inicializa el objeto. More... | |
MOboolean | Initialized () |
Pregunta si está inicializado. More... | |
Protected Member Functions | |
void | SetupShader (MOint w, MOint h, moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam &p_params, moMoldeoObject *p_src_object=NULL) |
void | SetGLConf (MOint w, MOint h) |
void | RestoreGLConf () |
void | BindDestFBO () |
void | UnbindDestFBO () |
void | BindSrcTex (MOuint p_i) |
void | BindSrcTex (MOfloat p_cycle) |
void | BindSrcTex (moTempo *p_tempo) |
void | BindSrcTex (moMoldeoObject *p_mob) |
void | UnbindSrcTex () |
void | RenderTexQuad (MOint w, MOint h) |
Protected Attributes | |
moShader * | m_shader |
moRenderManager * | m_renderman |
moGLManager * | m_glman |
moText | m_TextureFilterLabelName |
GLint | m_src_tex_unit [MO_MAX_TEXTURE_UNITS] |
GLint | m_src_tex_offset [MO_MAX_TEXTURE_UNITS] |
GLint | m_tempo_angle |
GLint | m_tempo_dt |
GLint | m_tempo_syncro |
GLint | m_tempo_delta |
GLint | m_tempo_ticks |
GLint | m_fade_const |
GLint | m_dest_tex_size |
GLint | m_random_uniform |
int | m_uniform_idx |
int | m_uniform_variables_idx [MAX_UNIFORM_VARS] |
idx of uniform parameters variables in moMoldeoObject More... | |
moTextFilterParam | m_DefParams |
idx of uniform variables in shader code moShader More... | |
moTextureIndex | m_src_tex |
moTextureIndex | m_dest_tex |
GLboolean | m_blend_on |
GLint | m_poly_mode |
GLenum | m_draw_buffers [MO_MAX_COLOR_ATTACHMENTS_EXT] |
MOboolean | m_use_screen_tex |
MOboolean | m_reattach_dest_tex |
Additional Inherited Members | |
Public Attributes inherited from moAbstract | |
MOboolean | m_bInitialized |
Valor de inicialización More... | |
Static Public Attributes inherited from moAbstract | |
static moDebug * | MODebug2 = new moDebug() |
Clase de impresión de errores para depuración More... | |
static moTextHeap * | MODebug = new moTextHeap() |
Lista de textos. More... | |
Esta clase define un filtro 2D para aplicar en texturas. Un filtro es básicamente un programa de shader (escrito en CG o GLSL) con un conjunto de predefinido de parámetros uniformes y una grilla 2D donde las texturas fuente son mapeadas. Los puntos de la grilla 2D pueden ser modificados en el estadio de vértices del filtro, permitiendo distorsiones arbitrarias en la forma de la texturas.
Definition at line 156 of file moTextureFilter.h.
moTextureFilter::moTextureFilter | ( | ) |
El constructor por defecto de la clase.
Definition at line 493 of file moTextureFilter.cpp.
|
inlinevirtual |
El destructor por defecto de la clase.
Definition at line 166 of file moTextureFilter.h.
void moTextureFilter::Apply | ( | MOuint | p_i, |
MOfloat | p_fade, | ||
const moTextFilterParam & | p_params | ||
) |
Aplica el filtro sobre las texturas de orígen y escribiendo el resutlado en las texturas de destino.
p_i | cuadro a utilizar en las texturas de orígen (en el caso de que sean animadas). |
p_fade | constante de "fading" utilizada para mezclar el resultado del filtro. |
p_params | parámetros del filtro. |
Definition at line 643 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | MOuint | p_i | ) |
Definition at line 638 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | MOfloat | p_cycle, |
MOfloat | p_fade, | ||
const moTextFilterParam & | p_params | ||
) |
Aplica el filtro sobre las texturas de orígen y escribiendo el resutlado en las texturas de destino.
p_cycle | fracción del ciclo entre 0.0 y 1.0 a utilizar en las texturas de orígen (en el caso de que sean animadas). |
p_fade | constante de "fading" utilizada para mezclar el resultado del filtro. |
p_params | parámetros del filtro. |
Definition at line 674 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | MOfloat | p_cycle | ) |
Definition at line 669 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | moTempo * | p_tempo, |
MOfloat | p_fade, | ||
const moTextFilterParam & | p_params | ||
) |
Aplica el filtro sobre las texturas de orígen y escribiendo el resutlado en las texturas de destino.
p_tempo | tempo a utilizar en las texturas de orígen (en el caso de que sean animadas). |
p_fade | constante de "fading" utilizada para mezclar el resultado del filtro. |
p_params | parámetros del filtro. |
Definition at line 705 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | moTempo * | p_tempo | ) |
Definition at line 700 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | moMoldeoObject * | p_src_mob, |
MOfloat | p_fade, | ||
const moTextFilterParam & | p_params | ||
) |
Definition at line 762 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | moMoldeoObject * | p_src_mob, |
moTempo * | p_tempo, | ||
MOfloat | p_fade, | ||
const moTextFilterParam & | p_params | ||
) |
Definition at line 735 of file moTextureFilter.cpp.
void moTextureFilter::Apply | ( | moMoldeoObject * | p_src_mob | ) |
Definition at line 730 of file moTextureFilter.cpp.
|
protected |
Definition at line 944 of file moTextureFilter.cpp.
|
protected |
Definition at line 984 of file moTextureFilter.cpp.
|
protected |
Definition at line 994 of file moTextureFilter.cpp.
|
protected |
Definition at line 1004 of file moTextureFilter.cpp.
|
protected |
Definition at line 1014 of file moTextureFilter.cpp.
void moTextureFilter::CheckDestTexAttachStatus | ( | ) |
Verifica que todas las texturas de destino estén asociadas a lo búfers de color del mismo FBO. En caso contrario, las mismas serán re-asociadas (utilizando el FBO de la primera textura de destino) en el momento de aplicar el filtro.
Definition at line 1053 of file moTextureFilter.cpp.
|
virtual |
Método de finalización.
Reimplemented from moAbstract.
Definition at line 628 of file moTextureFilter.cpp.
|
inline |
Devuelve el puntero a la lista de texturas de destino.
Definition at line 224 of file moTextureFilter.h.
|
inline |
Definition at line 226 of file moTextureFilter.h.
|
inline |
Devuelve el puntero a la lista de texturas de orígen.
Definition at line 219 of file moTextureFilter.h.
|
inline |
Definition at line 244 of file moTextureFilter.h.
|
inline |
Definition at line 240 of file moTextureFilter.h.
|
virtual |
Método de inicialización de la grilla.
p_glman | puntero al administrador de OpenGL. |
p_renderman | puntero al administrador de render. |
p_src_tex | referencia a la lista de texturas de orígen. |
p_dest_tex | referencia a la lista de texturas de destino. |
p_shader | puntero al programa de shader que define el filtro. |
p_params | puntero al objeto de parámetros a utilizar en este filtro. |
Definition at line 502 of file moTextureFilter.cpp.
|
protected |
Definition at line 934 of file moTextureFilter.cpp.
Definition at line 920 of file moTextureFilter.cpp.
|
inline |
Definition at line 237 of file moTextureFilter.h.
|
protected |
TODO: load and evaluate each parameter of m_shader->config using also p_src_object as parameters!!!
TODO: load and evaluate each parameter of m_shader->config using also p_src_object as parameters!!!
if (uniform_var_type=="FLOAT") { float p_float = 0.0; int paramidx = p_src_object->GetConfig()->GetParamIndex(uniform_var_name); if (paramidx>-1) { p_float = p_src_object->GetConfig()->Eval( moParamReference(paramidx) ); } else { int inletidx = p_src_object->GetInletIndex(uniform_var_name); if (inletidx>-1) { p_float = p_src_object->GetInlets()->Get(inletidx)->GetData()->Float(); } } glUniform1fARB( m_uniform_variables_idx[u], p_float );
MODebug2->Message("Assigning FLOAT:" + FloatToStr(p_float)); } else if (uniform_var_type=="INT") { float p_int = 0; int paramidx = p_src_object->GetConfig()->GetParamIndex(uniform_var_name); if (paramidx>-1) { p_int = p_src_object->GetConfig()->Int( moParamReference(paramidx) ); } else { int inletidx = p_src_object->GetInletIndex(uniform_var_name); if (inletidx>-1) { p_int = p_src_object->GetInlets()->Get(inletidx)->GetData()->Int(); } } glUniform1iARB( m_uniform_variables_idx[u], p_int ); MODebug2->Message("Assigning FLOAT:" + FloatToStr(p_float)); }
Definition at line 769 of file moTextureFilter.cpp.
|
protected |
Definition at line 978 of file moTextureFilter.cpp.
|
protected |
Definition at line 1044 of file moTextureFilter.cpp.
|
protected |
Definition at line 278 of file moTextureFilter.h.
|
protected |
idx of uniform variables in shader code moShader
Definition at line 272 of file moTextureFilter.h.
|
protected |
Definition at line 276 of file moTextureFilter.h.
|
protected |
Definition at line 264 of file moTextureFilter.h.
|
protected |
Definition at line 280 of file moTextureFilter.h.
|
protected |
Definition at line 263 of file moTextureFilter.h.
|
protected |
Definition at line 251 of file moTextureFilter.h.
|
protected |
Definition at line 279 of file moTextureFilter.h.
|
protected |
Definition at line 265 of file moTextureFilter.h.
|
protected |
Definition at line 283 of file moTextureFilter.h.
|
protected |
Definition at line 250 of file moTextureFilter.h.
|
protected |
Definition at line 249 of file moTextureFilter.h.
|
protected |
Definition at line 275 of file moTextureFilter.h.
|
protected |
Definition at line 257 of file moTextureFilter.h.
|
protected |
Definition at line 256 of file moTextureFilter.h.
|
protected |
Definition at line 258 of file moTextureFilter.h.
|
protected |
Definition at line 261 of file moTextureFilter.h.
|
protected |
Definition at line 259 of file moTextureFilter.h.
|
protected |
Definition at line 260 of file moTextureFilter.h.
|
protected |
Definition at line 262 of file moTextureFilter.h.
|
protected |
Definition at line 253 of file moTextureFilter.h.
|
protected |
Definition at line 268 of file moTextureFilter.h.
|
protected |
idx of uniform parameters variables in moMoldeoObject
Definition at line 269 of file moTextureFilter.h.
|
protected |
Definition at line 282 of file moTextureFilter.h.