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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moTextureFilterIndex.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  moTextureFilterIndex.cpp
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 
29 
30 *******************************************************************************/
31 
32 #include "moTextureFilterIndex.h"
33 
35 {
36  m_filters_array.Init(0, NULL);
37 
38 }
40 {
41  Finish();
42 }
43 
45 {
46  m_glman = p_glman;
47  m_fbman = p_fbman;
48  m_shaman = p_shaman;
49  m_texman = p_texman;
50  m_renderman = p_renderman;
51 
52  return true;
53 }
54 
55 MOboolean moTextureFilterIndex::Init( moParam* p_param, moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman)
56 {
57  m_glman = p_glman;
58  m_fbman = p_fbman;
59  m_shaman = p_shaman;
60  m_texman = p_texman;
61  m_renderman = p_renderman;
62 
63  MOuint res = LoadFilters(p_param);
64 
65  return 0 < res;
66 }
67 
68 MOboolean moTextureFilterIndex::Init(moConfig* p_cfg, MOuint p_param_idx, moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman)
69 {
70  m_glman = p_glman;
71  m_fbman = p_fbman;
72  m_shaman = p_shaman;
73  m_texman = p_texman;
74  m_renderman = p_renderman;
75 
76  MOuint res = LoadFilters(p_cfg, p_param_idx);
77 
78  return 0 < res;
79 }
80 
81 MOboolean moTextureFilterIndex::Init(moTextArray* p_filters_str, moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman)
82 {
83  m_glman = p_glman;
84  m_fbman = p_fbman;
85  m_shaman = p_shaman;
86  m_texman = p_texman;
87  m_renderman = p_renderman;
88 
89  MOuint res = LoadFilters(p_filters_str);
90 
91  return 0 < res;
92 }
93 
95 {
96  m_filters_array.Finish();
97  return true;
98 }
99 
101 {
102  MOint idx;
103  m_filters_array.Add(p_filter);
104  idx = m_filters_array.Count() - 1;
105  return idx;
106 }
107 
108 void moTextureFilterIndex::Apply(MOuint p_idx, MOuint p_i, MOfloat p_fade, const moTextFilterParam& p_params )
109 {
110  if (ValidIndex(p_idx)) m_filters_array[p_idx]->Apply(p_i, p_fade, p_params);
111 }
112 
113 void moTextureFilterIndex::Apply(MOuint p_idx, MOfloat p_cycle, MOfloat p_fade, const moTextFilterParam& p_params)
114 {
115  if (ValidIndex(p_idx)) m_filters_array[p_idx]->Apply(p_cycle, p_fade, p_params);
116 }
117 
118 void moTextureFilterIndex::Apply(MOuint p_idx, moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam& p_params)
119 {
120  if (ValidIndex(p_idx)) m_filters_array[p_idx]->Apply(p_tempo, p_fade, p_params);
121 }
122 
123 void moTextureFilterIndex::Apply(moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam& p_params)
124 {
125  for (MOuint i = 0; i < m_filters_array.Count(); i++) m_filters_array[i]->Apply(p_tempo, p_fade, p_params);
126 }
127 
129 {
130  if (p_idx < m_filters_array.Count()) return true;
131  else
132  {
133  moText text;
134  text = moText("Error(moTextureIndex): the index: ");
135  text += IntToStr(p_idx);
136  text += moText(" does not exists.");
137  MODebug2->Error(text);
138  return false;
139  }
140 }
141 
142 moText
144 
145  moText TextureFilterLabelName = "";
146  moText sep = "";
147  for(MOuint i=0; i < p_value->GetSubValueCount(); i++) {
148  TextureFilterLabelName+= (moText)sep + (moText)p_value->GetSubValue(i).Text();
149  sep = moText("::");
150  }
151  return TextureFilterLabelName;
152 }
153 
154 
156 
157  moText TextureFilterLabelName = MakeTextureFilterLabelName( p_value );
158 
159  moTextureFilter* pTextureFilter;
160 
161  for( MOuint f=0; f < m_filters_array.Count(); f++ ) {
162 
163  pTextureFilter = m_filters_array[f];
164  if ( pTextureFilter->GetTextureFilterLabelName() == TextureFilterLabelName ) {
165  return f;
166  }
167  }
168  return -1;
169 }
170 
172 
173  MOuint j;
174  MOint error_code;
175  MOuint nFilterParts;
176 
177  MOboolean reading_src_tex;
178 
179  moTextureFilter *pfilter;
180  moTextureArray src_tex, dest_tex;
181  moShader *pshader;
182 
183  MOuint dest_width, dest_height;
184  moText name, extension, left;
185 
186  MOint idx = TextureFilterExists(p_value);
187 
188  if ( idx != -1)
189  return (idx+1);
190 
191  nFilterParts = p_value->GetSubValueCount();
192  reading_src_tex = true;
193 
194  error_code = 0;
195  src_tex.Empty();
196  dest_tex.Empty();
197 
198 
199 
200  for (j = 0; j < nFilterParts; j++)
201  {
202  moValueBase& vbase( p_value->GetSubValue(j) );
203 
204  if ( vbase.GetType() == MO_VALUE_TXT &&
205  ( vbase.Type()==MO_DATA_TEXT ||
206  vbase.Type()==MO_DATA_IMAGESAMPLE ||
207  vbase.Type()==MO_DATA_IMAGESAMPLE_FILTERED )
208  ) {
209 
210  name = p_value->GetSubValue(j).Text();
211 
212  extension = name;
213  extension.Right(3);
214 
215  if (extension == moText("cfg"))
216  {
217  reading_src_tex = false;
218  error_code = LoadShader(name, &pshader);
219  }
220  else if (reading_src_tex)
221  {
222  // Loading source textures...
223  error_code = LoadSourceTexture(name, src_tex, j == 0, dest_width, dest_height);
224  }
225  else
226  {
227  // Creating destination textures...
228  left = name;
229  left.Left(3);
230  if (left == moText("res:")) error_code = LoadDestTexResolution(name, dest_width, dest_height);
231  else error_code = LoadDestTexture(name, dest_tex, dest_width, dest_height);
232  }
233  }
234  }
235 
236  if (error_code == 0)
237  {
238  pfilter = new moTextureFilter();
239  moTextFilterParam DefParam;
240  pfilter->Init(m_glman, m_renderman, src_tex, dest_tex, pshader, DefParam);
242  Add(pfilter);
243  }
244  else
245  {
246  // Print some error message...
247  if (error_code == 1)
248  MODebug2->Error("Error in creating filter: cannot load shader");
249  else if (error_code == 2)
250  MODebug2->Error("Error in creating filter: cannot load source texture");
251  else if (error_code == 3)
252  MODebug2->Error("Error in creating filter: cannot read resolution of destination texture");
253  else if (error_code == 4)
254  MODebug2->Error("Error in creating filter: cannot create destination texture");
255  else
256  MODebug2->Error("Unknown error in creating filter.");
257  }
258 
259  SetupDestTexFBO();
260 
261  return m_filters_array.Count();
262 
263 }
264 
266 {
267 
268  MOuint i, j;
269  MOint error_code;
270  MOuint nFilters, nFilterParts;
271 
272  MOboolean reading_src_tex;
273  moParam* param = p_param;
274 
275  moTextureFilter *pfilter = NULL;
276  moTextureArray src_tex, dest_tex;
277  moShader *pshader = NULL;
278 
279  MOuint dest_width, dest_height;
280  moText name, extension, left;
281 
282  nFilters = p_param->GetValuesCount();
283 
284  p_param->FirstValue();
285  for (i = 0; i < nFilters; i++)
286  {
287  param = p_param;
288  nFilterParts = param->GetValue().GetSubValueCount();
289  reading_src_tex = true;
290 
291  error_code = 0;
292  src_tex.Empty();
293  dest_tex.Empty();
294  for (j = 0; j < nFilterParts; j++)
295  {
296  name = param->GetValue().GetSubValue(j).Text();
297 
298  extension = name;
299  extension.Right(3);
300 
301  if (extension == moText("cfg"))
302  {
303  reading_src_tex = false;
304  error_code = LoadShader(name, &pshader);
305  }
306  else if (reading_src_tex)
307  {
308  // Loading source textures...
309  error_code = LoadSourceTexture(name, src_tex, j == 0, dest_width, dest_height);
310  }
311  else
312  {
313  // Creating destination textures...
314  left = name;
315  left.Left(3);
316  if (left == moText("res:")) error_code = LoadDestTexResolution(name, dest_width, dest_height);
317  else error_code = LoadDestTexture(name, dest_tex, dest_width, dest_height);
318  }
319  }
320 
321  if (pshader==NULL) error_code = 1;
322 
323  if (error_code == 0)
324  {
325  pfilter = new moTextureFilter();
326  moTextFilterParam DefParam;
327  pfilter->Init(m_glman, m_renderman, src_tex, dest_tex, pshader, DefParam);
329  Add(pfilter);
330  }
331  else
332  {
333  // Print some error message...
334  if (error_code == 1)
335  MODebug2->Error("Error in creating filter: cannot load shader");
336  else if (error_code == 2)
337  MODebug2->Error("Error in creating filter: cannot load source texture");
338  else if (error_code == 3)
339  MODebug2->Error("Error in creating filter: cannot read resolution of destination texture");
340  else if (error_code == 4)
341  MODebug2->Error("Error in creating filter: cannot create destination texture");
342  else
343  MODebug2->Error("Unknown error in creating filter.");
344  }
345 
346  p_param->NextValue();
347  }
348 
349  SetupDestTexFBO();
350 
351  return m_filters_array.Count();
352 
353 }
354 
356 {
357  MOuint i, j;
358  MOint error_code;
359  MOuint nFilters, nFilterParts;
360 
361  MOboolean reading_src_tex;
362  moParam* param;
363 
364  moTextureFilter *pfilter = NULL;
365  moTextureArray src_tex, dest_tex;
366  moShader *pshader = NULL;
367 
368  MOuint dest_width, dest_height;
369  moText name, extension, left;
370 
371  nFilters = p_cfg->GetParam(p_param_idx).GetValuesCount();
372 
373  p_cfg->SetCurrentParamIndex(p_param_idx);
374  p_cfg->FirstValue();
375  for (i = 0; i < nFilters; i++)
376  {
377  param = &p_cfg->GetParam();
378  nFilterParts = param->GetValue().GetSubValueCount();
379  reading_src_tex = true;
380 
381  error_code = 0;
382  src_tex.Empty();
383  dest_tex.Empty();
384  for (j = 0; j < nFilterParts; j++)
385  {
386  name = param->GetValue().GetSubValue(j).Text();
387 
388  extension = name;
389  extension.Right(3);
390 
391  if (extension == moText("cfg"))
392  {
393  reading_src_tex = false;
394  error_code = LoadShader(name, &pshader);
395  }
396  else if (reading_src_tex)
397  {
398  // Loading source textures...
399  error_code = LoadSourceTexture(name, src_tex, j == 0, dest_width, dest_height);
400  }
401  else
402  {
403  // Creating destination textures...
404  left = name;
405  left.Left(3);
406  if (left == moText("res:")) error_code = LoadDestTexResolution(name, dest_width, dest_height);
407  else error_code = LoadDestTexture(name, dest_tex, dest_width, dest_height);
408  }
409  }
410 
411  if (pshader==NULL) error_code = 1;
412 
413  if (error_code == 0)
414  {
415  pfilter = new moTextureFilter();
416  moTextFilterParam DefParam;
417  pfilter->Init(m_glman, m_renderman, src_tex, dest_tex, pshader, DefParam);
419  Add(pfilter);
420  }
421  else
422  {
423  // Print some error message...
424  if (error_code == 1)
425  MODebug2->Error("Error in creating filter: cannot load shader");
426  else if (error_code == 2)
427  MODebug2->Error("Error in creating filter: cannot load source texture");
428  else if (error_code == 3)
429  MODebug2->Error("Error in creating filter: cannot read resolution of destination texture");
430  else if (error_code == 4)
431  MODebug2->Error("Error in creating filter: cannot create destination texture");
432  else
433  MODebug2->Error("Unknown error in creating filter.");
434  }
435 
436  p_cfg->NextValue();
437  }
438 
439  SetupDestTexFBO();
440 
441  return m_filters_array.Count();
442 }
443 
444 MOuint moTextureFilterIndex::LoadFilters(moTextArray* p_filters_str)
445 {
446  MOuint i, j;
447  MOint error_code;
448  MOuint nFilters;
449 
450  MOboolean reading_src_tex;
451 
452  moTextureFilter *pfilter = NULL;
453  moTextureArray src_tex, dest_tex;
454  moShader *pshader = NULL;
455 
456  MOuint dest_width, dest_height;
457  moText name, extension, left, tmp;
458 
459  nFilters = p_filters_str->Count();
460  for (i = 0; i < nFilters; i++)
461  {
462  reading_src_tex = true;
463  moValue pValue;
464  error_code = 0;
465  src_tex.Empty();
466  dest_tex.Empty();
467  tmp = p_filters_str->Get(i);
468  j = 0;
469  while (tmp != moText(""))
470  {
471  name = tmp.Scan(moText(" "));
472  name = name.Trim();
473 
474  if (name!="") pValue.AddSubValue( name, "TXT" );
475 
476  extension = name;
477  extension.Right(3);
478 
479  if (extension == moText("cfg"))
480  {
481  reading_src_tex = false;
482  error_code = LoadShader(name, &pshader);
483  }
484  else if (reading_src_tex)
485  {
486  // Loading source textures...
487  error_code = LoadSourceTexture(name, src_tex, j == 0, dest_width, dest_height);
488  }
489  else
490  {
491  // Creating destination textures...
492  left = name;
493  left.Left(3);
494  if (left == moText("res:")) error_code = LoadDestTexResolution(name, dest_width, dest_height);
495  else error_code = LoadDestTexture(name, dest_tex, dest_width, dest_height);
496  }
497  }
498 
499  if (pshader==NULL) error_code = 1;
500 
501  if (error_code == 0)
502  {
503  moText filterlabelname = MakeTextureFilterLabelName( &pValue );
504  int idx = TextureFilterExists(&pValue);
505  if (idx>0) {
506 
507  } else {
508  pfilter = new moTextureFilter();
509  moTextFilterParam DefParam;
510  pfilter->Init(m_glman, m_renderman, src_tex, dest_tex, pshader, DefParam);
511  pfilter->SetTextureFilterLabelName( filterlabelname );
512  Add(pfilter);
513  }
514  }
515  else
516  {
517  // Print some error message...
518  if (error_code == 1)
519  MODebug2->Error("Error in creating filter: cannot load shader");
520  else if (error_code == 2)
521  MODebug2->Error("Error in creating filter: cannot load source texture");
522  else if (error_code == 3)
523  MODebug2->Error("Error in creating filter: cannot read resolution of destination texture");
524  else if (error_code == 4)
525  MODebug2->Error("Error in creating filter: cannot create destination texture");
526  else
527  MODebug2->Error("Unknown error in creating filter.");
528  }
529 
530  j++;
531  }
532 
533  SetupDestTexFBO();
534 
535  return m_filters_array.Count();
536 }
537 
539 {
540  MOint idx = m_shaman->GetShaderIndex(name, true);
541  if (-1 < idx)
542  {
543  *pshader = m_shaman->GetShader(idx);
544  return 0;
545  }
546  return 1;
547 }
548 
549 MOint moTextureFilterIndex::LoadSourceTexture(moText& name, moTextureArray& src_tex, MOboolean first_tex, MOuint& dest_width, MOuint& dest_height)
550 {
551  MOint idx = m_texman->GetTextureMOId(name, true);
552  if (-1 < idx)
553  {
554  moTexture* ptex = m_texman->GetTexture(idx);
555  src_tex.Add(ptex);
556  if (first_tex)
557  {
558  // By default, the resolution of the destination textures is the same
559  // as the source textures.
560  dest_width = ptex->GetWidth();
561  dest_height = ptex->GetHeight();
562  }
563  return 0;
564  }
565  return 2;
566 }
567 
568 MOint moTextureFilterIndex::LoadDestTexResolution( const moText& name, MOuint& dest_width, MOuint& dest_height)
569 {
570  moText tmp_width, tmp_height;
571  MOint l;
572 
573  tmp_height = name;
574  tmp_height.Scan(moText("x"));
575  l = tmp_height.Length();
576  tmp_height.Mid(1, l - 1);
577 
578  tmp_width = name;
579  tmp_width.Mid(4, tmp_width.Length() - l - 4);
580 
581  dest_width = atoi(tmp_width);
582  dest_height = atoi(tmp_height);
583 
584  return 0;
585 }
586 
587 MOint moTextureFilterIndex::LoadDestTexture( const moText& name, moTextureArray& dest_tex, MOuint dest_width, MOuint dest_height)
588 {
589  moTexture* ptex;
590  MOint idx = m_texman->GetTextureMOId(name, false);
591  if (-1 < idx)
592  {
593  // The destination texture already exists...
594  ptex = m_texman->GetTexture(idx);
595  dest_tex.Add(ptex);
596  return 0;
597  }
598  else
599  {
600  idx = m_texman->AddTexture(name, dest_width, dest_height);
601  if (-1 < idx)
602  {
603  ptex = m_texman->GetTexture(idx);
604  dest_tex.Add(ptex);
605  return 0;
606  }
607  else return 4;
608  }
609 }
610 
611 // Checks if all the destination textures can be assigned to the same fbo, to avoid context changes.
612 // This implementation is very simple, it not all the textures cannot be assigned to a single fbo,
613 // then the textures of each filter have their own fbo.
615 {
616  MOuint i, j;
617  MOint idx, total_tex_count;
618  moTextureIndex* dest_tex;
619  moTexture* ptex;
620  GLenum target0;
621  GLint internal_format0;
622  MOuint width0, height0;
623  MOboolean first_tex, test, compatible_tex;
624  moFBO* pfbo;
625  MOuint attach_pt;
626 
627  // First, checks if all the destination textures would be compatible with each other to be in the same
628  // fbo.
629  total_tex_count = 0;
630  first_tex = true;
631  compatible_tex = true;
632  for (i = 0; i < m_filters_array.Count(); i++)
633  {
634  dest_tex = m_filters_array[i]->GetDestTex();
635 
636  total_tex_count += dest_tex->Count();
637  for (j = 0; j < dest_tex->Count(); j++)
638  {
639  ptex = dest_tex->GetTexture(j);
640 
641  if (first_tex)
642  {
643  // Getting parameters of first texture.
644  target0 = ptex->GetTexParam().target;
645  internal_format0 = ptex->GetTexParam().internal_format;
646  width0 = ptex->GetWidth();
647  height0 = ptex->GetHeight();
648  }
649  else
650  {
651  // Comparing current texture with the parameters of the first one.
652  test = (target0 == ptex->GetTexParam().target) &&
653  (internal_format0 == ptex->GetTexParam().internal_format) &&
654  (width0 == ptex->GetWidth()) && (height0 == ptex->GetHeight());
655  if (!test)
656  {
657  compatible_tex = false;
658  break;
659  }
660  }
661 
662  first_tex = false;
663  }
664  }
665 
666  if (compatible_tex)
667  {
668  // All the textures can be assigned to the same fbo.
669  idx = m_fbman->CreateFBO();
670  pfbo = m_fbman->GetFBO(idx);
671 
672  if (pfbo == NULL) return;
673 
674  if (total_tex_count <= MO_MAX_COLOR_ATTACHMENTS_EXT)
675  {
676  // All the destination textures can be assigned to the available attachement points of the fbo.
677  // This is the optimal scenario.
678  for (i = 0; i < m_filters_array.Count(); i++)
679  {
680  dest_tex = m_filters_array[i]->GetDestTex();
681  for (j = 0; j < dest_tex->Count(); j++)
682  {
683  ptex = dest_tex->GetTexture(j);
684  ptex->SetFBO(pfbo);
685  pfbo->AddTexture(ptex->GetWidth(), ptex->GetHeight(),
686  ptex->GetTexParam(),
687  ptex->GetGLId(), attach_pt);
688  ptex->SetFBOAttachPoint(attach_pt);
689  }
690  }
691  }
692  else
693  {
694  // There are not enough attachement points in the fbo for all the textures. So, all the textures
695  // will be assigned to the same attachment point (the first one), and they will be reattached as
696  // needed.
697  for (i = 0; i < m_filters_array.Count(); i++)
698  {
699  dest_tex = m_filters_array[i]->GetDestTex();
700  for (j = 0; j < dest_tex->Count(); j++)
701  {
702  ptex = dest_tex->GetTexture(j);
703  ptex->SetFBO(pfbo);
704  }
705  }
706  }
707  }
708  else
709  {
710  // Creating a different fbo for each filter.
711  for (i = 0; i < m_filters_array.Count(); i++)
712  {
713  dest_tex = m_filters_array[i]->GetDestTex();
714 
715  idx = -1;
716  pfbo = NULL;
717  for (j = 0; j < dest_tex->Count(); j++)
718  {
719  ptex = dest_tex->GetTexture(j);
720 
721  if (j == 0) idx = m_fbman->CreateFBO();
722  pfbo = m_fbman->GetFBO(idx);
723 
724  if (pfbo != NULL)
725  {
726  ptex->SetFBO(pfbo);
727  pfbo->AddTexture(ptex->GetWidth(), ptex->GetHeight(),
728  ptex->GetTexParam(),
729  ptex->GetGLId(), attach_pt);
730  ptex->SetFBOAttachPoint(attach_pt);
731  }
732  }
733  }
734  }
735 
736  for (i = 0; i < m_filters_array.Count(); i++)
737  m_filters_array[i]->CheckDestTexAttachStatus();
738 }
739 
MOint LoadSourceTexture(moText &name, moTextureArray &src_tex, MOboolean first_tex, MOuint &dest_width, MOuint &dest_height)
Valor de un Parámetro.
Definition: moValue.h:501
MOint Add(moTextureFilter *p_filter)
moTextureFilterArray m_filters_array
void Error(moText p_text)
Anuncia y registra un error.
Definition: moAbstract.cpp:79
Tempo, beat, ritmo.
Definition: moTempo.h:44
GLint internal_format
Definition: moTypes.h:546
virtual MOboolean Finish()
moValueBase & GetSubValue(MOint p_indexsubvalue=0)
Definition: moValue.h:539
void Apply(MOuint p_idx, MOuint p_i, MOfloat p_fade, const moTextFilterParam &p_params)
bool NextValue()
Selecciona el próximo valor del parámetro actual.
Definition: moConfig.cpp:1545
#define MOboolean
Definition: moTypes.h:385
moText0 & Left(MOuint)
Definition: moText.cpp:484
MOint AddTexture(MOuint p_type, moText p_name, moTexParam p_tex_param=MODefTex2DParams)
virtual MOboolean Init()
Inicializa el objeto.
Definition: moAbstract.cpp:141
void AddSubValue(const moText &strvalue, moValueType p_valuetype)
Definition: moValue.cpp:1707
MOint LoadShader(moText &name, moShader **pshader)
MOint LoadDestTexture(const moText &name, moTextureArray &dest_tex, MOuint dest_width, MOuint dest_height)
#define MOfloat
Definition: moTypes.h:403
Definition: moFBO.h:60
clase de para manejar textos
Definition: moText.h:75
moTexture * GetTexture(MOuint p_moid)
MOint TextureFilterExists(moValue *p_value)
void SetFBOAttachPoint(MOuint p_fbo_attach_point)
Definition: moTexture.h:203
MOuint CreateFBO()
Definition: moFBManager.cpp:72
void SetFBO(moFBO *p_fbo)
Definition: moTexture.h:191
moTexture * GetTexture(MOuint p_idx)
moText0 & Trim()
Definition: moText.cpp:604
moText0 moText
Definition: moText.h:291
MOuint AddTexture(MOuint p_width, MOuint p_height, const moTexParam &p_param, MOuint p_glid, MOuint &p_attach_point)
Definition: moFBO.cpp:174
#define MO_MAX_COLOR_ATTACHMENTS_EXT
Definition: moFBO.h:46
moShaderManager * m_shaman
moText0 & Right(MOuint)
Definition: moText.cpp:491
#define MOint
Definition: moTypes.h:388
moText0 & Mid(MOuint, MOuint)
Definition: moText.cpp:498
moText MakeTextureFilterLabelName(moValue *p_value)
moText GetTextureFilterLabelName()
MOint LoadDestTexResolution(const moText &name, MOuint &dest_width, MOuint &dest_height)
MOuint GetGLId() const
Definition: moTexture.h:224
MOboolean ValidIndex(MOuint p_idx)
MOint GetTextureMOId(moParam *param, MOboolean p_create_tex)
clase base para el manejo de una textura
Definition: moTexture.h:78
moText0 Scan(char *)
Definition: moText.cpp:530
MOuint Length() const
Definition: moText.cpp:347
moShader * GetShader(MOuint p_idx)
MOuint LoadFilter(moValue *p_value)
moFBO * GetFBO(MOuint p_fbo)
Definition: moFBManager.h:93
Clase que implementa un administrador de shaders.
manejador de operaciones comunes de Open GL
Definition: moGLManager.h:154
static moDebug * MODebug2
Clase de impresión de errores para depuración
Definition: moAbstract.h:225
virtual MOboolean Init(moGLManager *p_glman, moRenderManager *p_renderman, moTextureArray &p_src_tex, moTextureArray &p_dest_tex, moShader *p_shader, const moTextFilterParam &p_params)
moText Text()
Definition: moValue.cpp:539
moRenderManager * m_renderman
MOuint GetHeight() const
Definition: moTexture.h:261
moValue & GetValue(MOint i=-1)
Definition: moParam.cpp:1204
void SetTextureFilterLabelName(moText p_text)
MOuint LoadFilters(moParam *p_param)
moParam & GetParam(MOint p_paramindex=-1)
Devuelve el parámetro por índice.
Definition: moConfig.cpp:984
GLenum target
Definition: moTypes.h:545
moTextureManager * m_texman
#define MOuint
Definition: moTypes.h:387
LIBMOLDEO_API moText0 IntToStr(int a)
Definition: moText.cpp:1070
MOint GetShaderIndex(moText p_name, MOboolean p_create_shader)
void FirstValue()
Definition: moParam.cpp:1254
bool SetCurrentParamIndex(int)
Selecciona el parámetro por el índice.
Definition: moConfig.cpp:1497
MOuint GetSubValueCount()
Definition: moValue.h:545
void NextValue()
Definition: moParam.cpp:1234
MOuint GetValuesCount() const
Definition: moParam.cpp:1065
MOuint GetWidth() const
Definition: moTexture.h:256
bool FirstValue()
Selecciona el primer valor del parámetro actual.
Definition: moConfig.cpp:1532
almacena la configuración de los parámetros de un objeto en un archivo XML
Definition: moConfig.h:193
moTexParam GetTexParam() const
Definition: moTexture.h:307