34 #include <FreeImage.h>
50 m_bBuildedFromFile =
false;
63 m_pResourceManager = NULL;
105 glDeleteTextures(1, &
m_glid);
124 glGenTextures(1, &
m_glid);
139 return SetBuffer(p_width, p_height, p_buffer, p_format, p_type);
151 if ( pFile==NULL )
return false;
154 FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
155 FIBITMAP *m_pImage = NULL;
161 if( fif == FIF_UNKNOWN ) {
166 if( (fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif) ) {
176 if( (fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif) ) {
178 m_pImage = FreeImage_LoadFromMemory( fif, (FIMEMORY*)
m_pFile->
GetData(), 0);
185 if (m_pImage != NULL)
189 FIBITMAP* pImageScaled = NULL;
191 p_width = FreeImage_GetWidth(m_pImage);
192 p_height = FreeImage_GetHeight(m_pImage);
194 bool size_mult_4 = ( p_width % 4 ) != 0 || ( p_height % 4) == 0;
196 bool resize_image =
false;
209 p_width = p_width / 4;
210 p_width = p_width * 4;
212 p_height = p_height / 4;
213 p_height = p_height* 4;
219 pImageScaled = FreeImage_Rescale( m_pImage, p_width, p_height, FILTER_BICUBIC );
221 FreeImage_Unload( m_pImage );
222 m_pImage = pImageScaled;
226 MOuint bpp = FreeImage_GetBPP(m_pImage);
227 FREE_IMAGE_COLOR_TYPE colortype = FreeImage_GetColorType(m_pImage);
228 FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(m_pImage);
230 MOuint red_mask = FreeImage_GetRedMask(m_pImage);
231 MOuint blue_mask = FreeImage_GetBlueMask(m_pImage);
232 MOuint green_mask = FreeImage_GetGreenMask(m_pImage);
233 MOuint pitch = FreeImage_GetPitch(m_pImage);
236 +
" image_type:"+
IntToStr(image_type)
238 +
" > blue_mask: " +
IntToStr(blue_mask)
239 +
" green_mask:"+
IntToStr(green_mask)
240 +
" red_mask:"+
IntToStr(red_mask) );
247 p_format = GL_LUMINANCE;
277 if ( image_type==FIT_BITMAP && (fif==FIF_JPEG || fif==FIF_PNG) ) {
279 for(
int j = 0; j < (int)p_height; j++) {
281 BYTE *pixel = (BYTE *) FreeImage_GetScanLine( m_pImage, j );
282 for(
int i = 0; i < (int)p_width; i++) {
283 BYTE tmp = pixel[FI_RGBA_RED];
284 pixel[FI_RGBA_RED] = pixel[FI_RGBA_BLUE];
286 pixel[FI_RGBA_BLUE] = tmp;
301 if ( image_type==FIT_BITMAP && fif==FIF_PNG ) {
303 for(
int j = 0; j < (int)p_height; j++) {
305 BYTE *pixel = (BYTE *) FreeImage_GetScanLine( m_pImage, j );
306 for(
int i = 0; i < (int)p_width; i++) {
307 BYTE tmp = pixel[FI_RGBA_RED];
308 pixel[FI_RGBA_RED] = pixel[FI_RGBA_BLUE];
310 pixel[FI_RGBA_BLUE] = tmp;
331 res =
SetBuffer(p_width, p_height, FreeImage_GetBits(m_pImage), p_format);
333 FreeImage_Unload(m_pImage);
347 moText extension = p_filename;
349 return (!stricmp(extension,
"tga") ||
350 !stricmp(extension,
"jpg") ||
351 !stricmp(extension,
"png") ||
352 !stricmp(extension,
"gif") ||
353 !stricmp(extension,
"bmp") ||
354 !stricmp(extension,
"xpm") ||
355 !stricmp(extension,
"ppm"));
361 return Load( pValue );
390 glTexSubImage2D(
m_param.
target, 0, 0, 0, p_width, p_height, p_format, p_type, p_buffer);
414 if ( p_buffer == NULL ) {
423 p_format!=GL_RGB && p_format!=GL_RGBA ) {
427 if ( p_type!=GL_UNSIGNED_BYTE && p_type!=GL_FLOAT && p_type!=GL_BYTE ) {
433 glGetTexImage(
m_param.
target, 0, p_format, p_type, p_buffer);
454 FIBITMAP* fbitmap = NULL;
455 FIBITMAP* fbitmapcopy = NULL;
457 BYTE* tempbuffer = NULL;
461 if (x0 == 0 && y0 == 0 && x1 == 0 && y1 == 0) {
464 if (tempbuffer==NULL)
return false;
465 if (!
GetBuffer( tempbuffer, GL_RGBA, GL_UNSIGNED_BYTE ) )
return false;
468 fbitmap = FreeImage_ConvertFromRawBits( (BYTE*)tempbuffer,
GetWidth(),
GetHeight(), pitch, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK,
false );
470 delete [] tempbuffer;
474 int ww = (x1 - x0 - 1);
475 int hh = (y1 - y0 - 1);
478 if (tempbuffer==NULL)
return false;
480 if (!
GetBuffer( tempbuffer, GL_RGBA, GL_UNSIGNED_BYTE ) )
return false;
483 fbitmap = FreeImage_ConvertFromRawBits( (BYTE*)tempbuffer,
GetWidth(),
GetHeight(), pitch, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK,
false );
484 fbitmapcopy = FreeImage_Copy( fbitmap, x0, y0, x1, y1 );
485 FreeImage_Unload(fbitmap);
486 fbitmap = fbitmapcopy;
488 delete [] tempbuffer;
497 if (fbitmap && FreeImage_GetHistogram( (FIBITMAP *)fbitmap, (DWORD*)
Histogram, FICC_BLACK )) {
503 for(
int ih=0; ih <256; ih++) {
530 for(
int ih=0; ih <256; ih++) {
538 for(
int z=0;z<5;z++) {
539 if (Totals[z]>0)
Contrast+= Group[z] / Totals[z];
545 }
else MODebug2->
Error(
moText(
"moTexture::CalculateLuminanceAndConstrast Histogram error"));
547 if (fbitmap) FreeImage_Unload( fbitmap );
574 if (p_src_mob==NULL)
return GetGLId();
583 int lineWidth =
m_width * p_depth;
589 for(
MOuint i = 0; i < (m_height >> 1); i++)
591 memcpy(tmp_buffer, top, lineWidth);
592 memcpy(top, bottom, lineWidth);
593 memcpy(bottom, tmp_buffer, lineWidth);
595 top =(
MOubyte*)((BYTE*) top + lineWidth);
596 bottom =(
MOubyte*)((BYTE*) bottom - lineWidth);
602 if (p_src_tex != NULL)
657 p_width = ( p_width / 4 ) * 4;
658 p_height = ( p_height / 4 ) * 4;
679 else if (
RenderMan()->IsTextureNonPowerOf2Disabled())
708 if (bytes_per_pixel>0) resized = resized || bytes_per_pixel!=(int)
m_buffer_bytespp;
711 bool create_buffer = force_creation;
713 if ( resized || force_creation ) {
719 create_buffer =
true;
744 for (i = 1; i < p_seed; i *= 2);
753 GLenum pixel_format = GL_RGBA;
754 GLenum pixel_type_format = GL_UNSIGNED_BYTE;
755 void* blankdata = NULL;
757 MOint* i_blankdata = NULL;
762 pixel_format = GL_RGBA;
763 pixel_type_format = GL_UNSIGNED_BYTE;
766 ub_blankdata = (
MOubyte*) blankdata;
769 pixel_format = GL_RGBA;
770 pixel_type_format = GL_UNSIGNED_BYTE;
773 ub_blankdata = (
MOubyte*) blankdata;
778 pixel_format = GL_RGBA_INTEGER;
779 pixel_type_format = GL_INT;
782 i_blankdata = (
MOint*) blankdata;
786 pixel_format = GL_RGBA;
787 pixel_type_format = GL_FLOAT;
790 f_blankdata = (
MOfloat*) blankdata;
794 pixel_format = GL_RGBA;
795 pixel_type_format = GL_UNSIGNED_BYTE;
798 i_blankdata = (
MOint*) blankdata;
809 if (i_blankdata)
delete [] i_blankdata;
810 if (ub_blankdata)
delete [] ub_blankdata;
811 if (f_blankdata)
delete [] f_blankdata;
833 if ( newfilename==
moText(
"") ) {
853 thumbnailfilename = newfilename;
856 FREE_IMAGE_FORMAT fif;
857 FIBITMAP* fbitmap = NULL;
861 MODebug2->
Error(
"moTexture::CreateThumbnail > no width or height, texture surface is 0.");
865 unsigned int bpp = 24;
866 unsigned int bytesperpixel = 3;
867 unsigned int pitch = bytesperpixel *
GetWidth();
869 GLenum gbufferformat = GL_BGR;
871 GLenum gbufferformat = GL_RGB;
873 GLenum gcomponenttype = GL_UNSIGNED_BYTE;
875 if ( p_bufferformat ==
moText(
"PNGA")) {
878 options = PNG_DEFAULT;
879 thumbnailfilename+=
moText(
".png");
883 gbufferformat = GL_BGRA;
885 gbufferformat = GL_RGBA;
887 }
else if ( p_bufferformat ==
moText(
"PNGF")) {
890 options = PNG_DEFAULT;
891 thumbnailfilename+=
moText(
".png");
895 gbufferformat = GL_BGRA;
897 gbufferformat = GL_RGBA;
899 gcomponenttype = GL_FLOAT;
901 }
else if ( p_bufferformat ==
moText(
"PNG")) {
903 options = PNG_DEFAULT;
904 thumbnailfilename+=
moText(
".png");
906 if ( p_bufferformat ==
moText(
"JPG") || p_bufferformat ==
moText(
"JPGNORMAL")) {
909 options = JPEG_QUALITYNORMAL;
910 thumbnailfilename+=
moText(
".jpg");
912 }
else if ( p_bufferformat ==
moText(
"JPGSUPERB") ) {
915 options = JPEG_QUALITYSUPERB;
916 thumbnailfilename+=
moText(
".jpg");
918 }
else if ( p_bufferformat ==
moText(
"JPGBAD") ) {
921 options = JPEG_QUALITYBAD;
922 thumbnailfilename+=
moText(
".jpg");
924 }
else if ( p_bufferformat ==
moText(
"JPGAVERAGE") ) {
927 options = JPEG_QUALITYAVERAGE;
928 thumbnailfilename+=
moText(
".jpg");
930 }
else if ( p_bufferformat ==
moText(
"JPGGOOD") ) {
933 options = JPEG_QUALITYGOOD;
934 thumbnailfilename+=
moText(
".jpg");
936 }
else if ( p_bufferformat ==
moText(
"TGA") ) {
940 thumbnailfilename+=
moText(
".tga");
946 if (gcomponenttype==GL_UNSIGNED_BYTE)
958 MODebug2->
Error(
"moTexture::CreateThumbnail > no memory for buffer data allocation or invalid component type.");
980 fbitmap = FreeImage_ConvertFromRawBits( (BYTE*)
m_pBufferData,
998 unsigned int fwidth = FreeImage_GetWidth(fbitmap);
999 unsigned int fheight = FreeImage_GetHeight(fbitmap);
1000 unsigned int fpitch = FreeImage_GetPitch(fbitmap);
1001 unsigned int fbpp = FreeImage_GetBPP(fbitmap);
1007 MODebug2->
Error(
"moTexture::CreateThumbnail > freeimage width and height does not match texture wxh > fwidth:" +
IntToStr(fwidth) +
" fheight:" +
IntToStr(fheight) );
1012 MODebug2->
Error(
"moTexture::CreateThumbnail > freeimage bpp and pitch does not match texture > fpitch:" +
IntToStr(fpitch) +
" vs pitch:" +
IntToStr(pitch) +
" fbpp (bits per pixel):" +
IntToStr(bpp) +
" vs bpp:" +
IntToStr(bpp) );
1032 FIBITMAP* fbitmap2 = NULL;
1038 fbitmap2 = FreeImage_Copy( fbitmap, 0, 0, w, h);
1039 if (fbitmap2 && fbitmap) { FreeImage_Unload( fbitmap ); fbitmap=fbitmap2; }
1045 if (w!=(
int)
GetWidth() || h!=(int)
GetHeight()) fbitmap2 = FreeImage_Rescale( fbitmap, w, h, FILTER_BICUBIC );
1046 if (fbitmap2 && fbitmap) { FreeImage_Unload( fbitmap ); fbitmap=fbitmap2; }
1054 if (!FreeImage_Save( fif, fbitmap, thumbnailfilename, options )) {
1055 MODebug2->
Error(
"moTexture::CreateThumbnail > not saved to disc. thumbnailfilename: " + thumbnailfilename);
1058 if (fbitmap) { FreeImage_Unload( fbitmap ); }
1070 return thumbnailfilename;
1082 reference_counter = 0;
1084 m_bBitmapInMemory =
false;
1087 m_BufferFormat =
moText(
"JPG");
1092 for( i = 0; i<256; i++) Histogram[i] = 0;
1108 m_BufferFormat = bufferformat;
1117 if ( m_bBitmapInMemory && hmem!=NULL ) {
1119 reference_counter = 1;
1122 FreeImage_CloseMemory((FIMEMORY*)hmem);
1127 hmem = FreeImage_OpenMemory();
1131 if ( m_BufferFormat ==
moText(
"JPG")) {
1133 options = JPEG_QUALITYNORMAL;
1134 }
else if ( m_BufferFormat ==
moText(
"JPGSUPERB") ) {
1136 options = JPEG_QUALITYSUPERB;
1137 }
else if ( m_BufferFormat ==
moText(
"JPGBAD") ) {
1139 options = JPEG_QUALITYBAD;
1140 }
else if ( m_BufferFormat ==
moText(
"JPGAVERAGE") ) {
1142 options = JPEG_QUALITYAVERAGE;
1143 }
else if ( m_BufferFormat ==
moText(
"JPGGOOD") ) {
1145 options = JPEG_QUALITYGOOD;
1146 }
else if ( m_BufferFormat ==
moText(
"TGA") ) {
1149 }
else if ( m_BufferFormat ==
moText(
"PNG") ) {
1152 }
else if ( m_BufferFormat ==
moText(
"XPM") ) {
1155 }
else if ( m_BufferFormat ==
moText(
"RAW") ) {
1160 if ( FreeImage_SaveToMemory( (FREE_IMAGE_FORMAT)fif, (FIBITMAP *)p_bitmap, (FIMEMORY*)hmem, options ) ) {
1161 m_SizeInMemory = FreeImage_TellMemory((FIMEMORY*)hmem);
1162 m_bBitmapInMemory =
true;
1164 m_width = FreeImage_GetWidth((FIBITMAP *)p_bitmap);
1165 m_height = FreeImage_GetHeight((FIBITMAP *)p_bitmap);
1169 if (FreeImage_GetHistogram( (FIBITMAP *)p_bitmap, (DWORD*)Histogram, FICC_BLACK )) {
1175 for(
int ih=0; ih <256; ih++) {
1176 Total+= Histogram[ih];
1177 Luminance+= Histogram[ih]*ih;
1181 Luminance = Luminance / Total;
1204 for(
int ih=0; ih <256; ih++) {
1206 dif = ( Histogram[ih]*(ih - Luminance)*(ih - Luminance));
1208 Totals[zone]+= Histogram[ih];
1212 for(
int z=0;z<5;z++) {
1213 if (Totals[z]>0) Contrast+= Group[z] / Totals[z];
1215 Contrast = Contrast / 5;
1223 }
else m_bBitmapInMemory =
false;
1227 return m_bBitmapInMemory;
1233 if (hmem!=NULL &&
m_glid>0) {
1240 FreeImage_TellMemory((FIMEMORY*)hmem);
1241 FreeImage_SeekMemory( (FIMEMORY*)hmem, 0L, SEEK_SET);
1246 pImage = FreeImage_LoadFromMemory( (FREE_IMAGE_FORMAT)fif, (FIMEMORY*)hmem, 0);
1248 switch (FreeImage_GetBPP(pImage))
1252 _format = GL_LUMINANCE;
1259 if (FreeImage_GetBlueMask(pImage) == 0x000000FF) _format = GL_BGR;
1272 if (FreeImage_GetBlueMask(pImage) == 0x000000FF) _format = GL_BGRA_EXT;
1287 FreeImage_Unload( pImage );
1301 m_BufferFormat = p_bufferformat;
1303 if (p_bitmap != NULL)
1326 if (reference_counter==0) {
1327 if (m_bBitmapInMemory) {
1328 glGenTextures(1, &
m_glid);
1332 reference_counter++;
1334 }
else MODebug2->
Push(
moText(
"moTextureMemory::GetReference no bitmap in memory ") );
1336 }
else MODebug2->
Error(
moText(
"moTextureMemory::GetReference Error: object not initialized") );
1338 return ((
int)reference_counter);
1342 if (reference_counter>0) {
1343 reference_counter--;
1344 if ( reference_counter==0 ) {
1347 glDeleteTextures(1,&
m_glid);
1357 FreeImage_CloseMemory( (FIMEMORY*)hmem );
1363 fif = (int)FIF_UNKNOWN;
1482 moTextArray copy_filter_0;
1483 copy_filter_0.Add(
moText( this->
m_name+
" shaders/Copy.cfg "+this->
m_name+
"copyStart") );
1492 moTextArray copy_filter_0;
1493 copy_filter_0.Add(
moText( this->
m_name+
" shaders/Copy.cfg "+this->
m_name+
"copyEnd") );
1502 moTextArray copy_filter_0;
1503 copy_filter_0.Add(
moText( this->
m_name+
"copyStart "+this->
m_name+
"copyEnd shaders/TexInterpolator.cfg "+this->
m_name+
"") );
1721 PeliV = fmod( (
float)p_cycle, (
float)1.0 );
1793 moText begin = p_filename;
1795 return !stricmp(begin,
"multiple");
1801 return Load(pValue);
1811 for (
int i = 0; i < nframes; i++)
1905 #ifdef MO_DIRECTSHOW
2000 switch(stream_state) {
2017 return stream_state;
2106 moFile FileName(p_filename);
2108 return (!stricmp(extension,
".avi") ||
2109 !stricmp(extension,
".mov") ||
2110 !stricmp(extension,
".mpg") ||
2111 !stricmp(extension,
".mp4")||
2112 !stricmp(extension,
".ogg") ||
2113 !stricmp(extension,
".ogm") ||
2114 !stricmp(extension,
".ogv") ||
2115 !stricmp(extension,
".webm") ||
2116 !stricmp(extension,
".web") ||
2117 !stricmp(extension,
".mpv") ||
2118 !stricmp(extension,
".mkv") ||
2119 !stricmp(extension,
".m2v"));
2126 bool quicktime =
false;
2128 extension = p_filename;
2131 if (extension==
moText(
"mov")) quicktime =
true;
2183 return Load( pValue );
virtual moStreamState State()
virtual void Seek(long frame, float rate=1.0)
MOuint GetDataWidth() const
MOboolean Initialized()
Pregunta si está inicializado.
Parámetros internos de una textura.
moFile * GetFile(moText p_FileName)
virtual MOboolean LoadFromBitmap(moBitmap *p_bitmap)
Guarda el bitmap con el formato elegido en memoria.
virtual void SetInterpolation(MOuint p_FrameJump, MOuint p_InterpolationTime)
static void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
moVideoFormat GetVideoFormat()
Devuelve el formato de video.
void Error(moText p_text)
Anuncia y registra un error.
virtual MOboolean Finish()
virtual MOulong GetPosition()
bool DestroyRetreivedBucket()
MOboolean m_bBuildedFromFile
MOuint SetFBOandAttachPoint(moFBO *p_fbo)
virtual void GetFrame(MOuint p_i)
moValueBase & GetSubValue(MOint p_indexsubvalue=0)
moTextureFilter * m_pCopyStart
void GetFrame(MOuint p_i)
virtual ~moTextureMemory()
void CalculateSize(MOuint p_width, MOuint p_height)
MOboolean BuildFromBuffer(MOuint p_width, MOuint p_height, const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
virtual moPlayMode GetPlayMode()
virtual MOboolean Finish()
void GetFrame(MOuint p_i)
moTextureFilter * Get(MOuint p_idx)
virtual ~moTextureAnimated()
moDefineDynamicArray(moTextureArray) moTexture
virtual MOboolean Finish()
LIBMOLDEO_API moText0 FloatToStr(double a)
moRenderManager * GetRenderMan()
virtual void SetVolume(float volume)
moResourceManager * m_pResourceManager
virtual MOboolean BuildFromMemory()
Construye la textura opengl desde el bitmap en memoria.
MOboolean Load(moParam *p_param)
MOboolean IsTextureNonPowerOf2Disabled() const
MOfloat m_fFramesPerSecond
bool Unlock()
Libera el acceso al buffer interno.
const moTexParam MODefTex2DParams
Parámetros internos predeterminados de una textura.
MOboolean RectTexture(GLenum p_target) const
MOboolean BuildEmpty(MOuint p_width, MOuint p_height)
moTextureFilterIndex * GetTextureFilterIndex()
MOboolean LoadMovieFile(moText p_filename)
virtual void SetContrast(float contrast)
bool Lock()
Paraliza el acceso al buffer interno.
virtual MOboolean Init()
Inicializa el objeto.
MOboolean MipMapTexture(GLint p_min_filter)
virtual void SetSaturation(float saturation)
moText GetExtension()
Get absolute path and filename "/D/PP/myFileName.txt".
const moTextFilterParam & GetTextFilterParam()
MOboolean CheckErrors(moText p_location)
moFileManager * m_pFileMan
void Apply(MOuint p_i, MOfloat p_fade, const moTextFilterParam &p_params)
virtual void SetBalance(float balance)
virtual void SetVolume(float volume)=0
Fija el nivel de volumen.
moShaderManager * GetShaderMan()
void FlipBufferVert(MOubyte *pBuffer, MOint p_depth)
void SetTextureCount(MOuint p_tex_count)
moShader * m_pShaderInterpolate
void AddFrame(moTexture *p_texture)
moText CreateThumbnail(moText p_bufferformat, int w, int h, moText newfilename=moText(""))
MOboolean m_bInterpolating
clase de para manejar textos
void SetFBOAttachPoint(MOuint p_fbo_attach_point)
virtual MOboolean ActivateInterpolation(MOboolean activate=true)
virtual MOulong GetPosition()=0
La posición del stream en cuadros.
Grafo de reproducción de video.
void SetFBO(moFBO *p_fbo)
virtual MOboolean NeedsInterpolation()
virtual void SetFrameCount(MOuint p_nframes)
MOuint AddTexture(MOuint p_width, MOuint p_height, const moTexParam &p_param, MOuint p_glid, MOuint &p_attach_point)
virtual MOulong GetFramesLength()=0
La cantidad de frames, el largo del stream.
MOboolean SupportedFile(moText p_filename)
virtual moStreamState GetState()
Estado de la reproducción.
virtual void SetSaturation(float saturation)=0
MOuint GetDataHeight() const
virtual bool BuildLiveVideoGraph(moText filename, moBucketsPool *pBucketsPool)=0
Grafo de reproducción de video en modo vivo, asyncronicamente reproducido en función del clock...
MOboolean SupportedFile(moText p_filename)
virtual MOboolean Finish()
MOboolean GetBuffer(GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
moFileManager * GetFileMan()
void SetName(moText p_name)
virtual MOint Interpolate()
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
static MOuint NextPowerOf2(MOuint p_seed)
MOboolean ValidTexture(MOuint p_i)
clase base para el manejo de una textura
moText GetCompletePath()
Get inmediate folder name: return "PP" for "PP/myFileName.txt".
Administrador de recursos.
virtual void SetPlayMode(moPlayMode playmode)
MOuint m_fbo_attach_point
MOfloat m_InterpolationPosition
void EmptyBucket()
Libera el espacio de memoria.
MOuint m_InterpolationTime
virtual MOuint GetActualFrame()
bool CalculateLuminanceAndConstrast(int x0=0, int y0=0, int x1=0, int y1=0)
virtual void Stop()=0
Detener la reproducción del video.
MOint ScreenHeight() const
void SetFrame(MOuint p_i, moTexture *p_texture)
virtual MOboolean IsInterpolating()
Clase que implementa un administrador de shaders.
virtual void Play()=0
Reproducir el video.
static moDebug * MODebug2
Clase de impresión de errores para depuración
virtual void SetContrast(float contrast)=0
virtual bool BuildLiveQTVideoGraph(moText filename, moBucketsPool *pBucketsPool)=0
moTexture & operator=(const moTexture &p_src_tex)
moDataManager * GetDataMan()
MOboolean Load(moText p_FileName, MOboolean bWaitForDownload=false)
moTextureFilter * m_pCopyEnd
MOboolean BuildFromFile(moText p_filename)
virtual void SetHue(float hue)=0
Espacio en memoria para compartir datos entre objetos.
void Push(moText p_text)
Apila el mensaje dentro de la pila de mensajes.
virtual void SetHue(float hue)
moValue & GetValue(MOint i=-1)
MOuint LoadFilters(moParam *p_param)
MOboolean Load(moParam *p_param)
MOboolean Load(moParam *p_param)
virtual void SetFramesPerSecond(MOfloat p_fps)
bool IsPowerOfTwo(int iValue)
MOboolean SupportedFile(moText p_filename)
virtual void SetBrightness(float brightness)
moTextureFilter * m_pInterpolator
void CopyFromTex(moTexture *p_src_tex, MOboolean p_copy_glid, MOboolean p_copy_moid, MOboolean p_copy_type, MOboolean p_copy_name)
LIBMOLDEO_API moText0 IntToStr(int a)
MOboolean m_bInterpolation
moTextureArray m_textures_array
MOubyte * GetBuffer()
Devuelve el puntero al buffer de datos.
MOboolean Reload(bool force_kill=true)
moBucket * RetreiveBucket()
virtual bool InitGraph()=0
Inicialización del grafo.
virtual MOboolean Finish()
virtual MOboolean BuildFromBitmap(moBitmap *p_bitmap, moText p_bufferformat="JPG")
Guarda el bitmap con el formato elegido en memoria, luego construye la textura opengl.
virtual void SetBalance(float balance)=0
Fija el balance entre canal izquierdo y derecho en caso de haberlos.
MOuint GetSubValueCount()
moBucketsPool m_BucketsPool
una textura asociada a una animación de cuadros
MOboolean m_bInitialized
Valor de inicialización
virtual void Seek(MOuint frame, float rate=1.0)=0
Busca y posiciona.
bool ResetBufferData(bool force_creation=false, int bytes_per_pixel=0)
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
MOint ScreenWidth() const
virtual void Pause()=0
Pausa la reproducción del video.
moDataManager * m_pDataMan
virtual MOboolean IsInterpolationActive()
MOboolean SetBuffer(const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
MOulong moGetTicks()
Devuelve en milisegundos el valor del reloj de Moldeo.
moTexParam GetTexParam() const