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.
|
clase base para el manejo de una textura con su copia comprimida en memoria More...
#include <moTexture.h>
Public Member Functions | |
moTextureMemory () | |
virtual | ~moTextureMemory () |
virtual MOboolean | Init (moText p_name, MOuint p_moid, moResourceManager *p_res, moTexParam p_param=MODefTex2DParams) |
virtual MOboolean | Init (moText p_name, MOuint p_moid, moResourceManager *p_res, moText bufferformat, moBitmap *pImageResult, moTexParam p_param=MODefTex2DParams) |
virtual MOboolean | BuildFromMemory () |
Construye la textura opengl desde el bitmap en memoria. More... | |
virtual MOboolean | BuildFromBitmap (moBitmap *p_bitmap, moText p_bufferformat="JPG") |
Guarda el bitmap con el formato elegido en memoria, luego construye la textura opengl. More... | |
virtual MOboolean | LoadFromBitmap (moBitmap *p_bitmap) |
Guarda el bitmap con el formato elegido en memoria. More... | |
virtual MOboolean | Finish () |
int | GetReference () |
void | ReleaseReference () |
int | GetContrast () |
int | GetLuminance () |
moVector3f | GetColorMatrixCorner (int corner) |
0 left up, 1 right up, 2, left down, 3, righ down More... | |
moVector3f | GetColorAverage () |
Public Member Functions inherited from moTexture | |
moTexture () | |
virtual | ~moTexture () |
MOboolean | BuildEmpty (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) |
MOboolean | BuildFromFile (moText p_filename) |
MOboolean | SupportedFile (moText p_filename) |
MOboolean | Load (moParam *p_param) |
MOboolean | Load (moValue *p_value) |
MOboolean | SetBuffer (const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE) |
MOboolean | SetBuffer (MOuint p_width, MOuint p_height, const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE) |
MOboolean | GetBuffer (GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE) |
void | SetGLMan (moGLManager *p_gl) |
void | SetDataMan (moDataManager *p_dataman) |
void | SetFileMan (moFileManager *p_fileman) |
void | SetFBO (moFBO *p_fbo) |
MOuint | SetFBOandAttachPoint (moFBO *p_fbo) |
void | SetFBOAttachPoint (MOuint p_fbo_attach_point) |
moFBO * | GetFBO () const |
MOuint | GetFBOAttachPoint () const |
moTextureType | GetType () const |
MOuint | GetGLId () const |
MOuint | GetGLId (moMoldeoObject *p_src_mob) |
TODO: check this! obsolete? More... | |
MOuint | GetMOId () const |
void | SetMOId (MOuint p_moid) |
moText | GetName () const |
void | SetName (moText p_name) |
MOuint | GetWidth () const |
MOuint | GetHeight () const |
MOuint | GetDataWidth () const |
MOuint | GetDataHeight () const |
MOuint | GetComponents () const |
MOlong | GetTexelCount () const |
MOlong | GetDataTexelCount () const |
MOfloat | GetMaxCoordS () const |
MOfloat | GetMaxCoordT () const |
moTexParam | GetTexParam () const |
GLenum | GetTexTarget () const |
GLenum | GetTexInternalFormat () const |
GLint | GetMinFilter () const |
GLint | GetMagFilter () const |
GLint | GetWrapS () const |
GLint | GetWrapT () const |
void | FlipBufferVert (MOubyte *pBuffer, MOint p_depth) |
void | CopyFromTex (moTexture *p_src_tex, MOboolean p_copy_glid, MOboolean p_copy_moid, MOboolean p_copy_type, MOboolean p_copy_name) |
moTexture & | operator= (const moTexture &p_src_tex) |
MOboolean | IsBuildedFromFile () const |
moText | CreateThumbnail (moText p_bufferformat, int w, int h, moText newfilename=moText("")) |
bool | CalculateLuminanceAndConstrast (int x0=0, int y0=0, int x1=0, int y1=0) |
int | GetLuminance () const |
int | GetContrast () const |
MOboolean | Refresh () |
Public Member Functions inherited from moAbstract | |
moAbstract () | |
virtual | ~moAbstract () |
virtual MOboolean | Init () |
Inicializa el objeto. More... | |
MOboolean | Initialized () |
Pregunta si está inicializado. More... | |
clase base para el manejo de una textura con su copia comprimida en memoria
Esta clase mantiene en memoria una copia comprimida de la imagen a medida que esta imagen es requerida se aumenta el numero de referencia cuando la cantidad de referencias llegan a cero se da de baja de la memoria de opengl
Definition at line 442 of file moTexture.h.
moTextureMemory::moTextureMemory | ( | ) |
Constructor por defecto.
Definition at line 1081 of file moTexture.cpp.
|
virtual |
Destructor por defecto.
Definition at line 1096 of file moTexture.cpp.
|
virtual |
Guarda el bitmap con el formato elegido en memoria, luego construye la textura opengl.
Save into memory
Definition at line 1297 of file moTexture.cpp.
|
virtual |
Construye la textura opengl desde el bitmap en memoria.
just execute this time for building the texture really in card memory
then apply the buffer
Definition at line 1231 of file moTexture.cpp.
|
virtual |
Destruye la textura openGL.
Reimplemented from moTexture.
Definition at line 1354 of file moTexture.cpp.
|
inline |
Definition at line 505 of file moTexture.h.
|
inline |
0 left up, 1 right up, 2, left down, 3, righ down
Definition at line 504 of file moTexture.h.
|
inline |
Definition at line 498 of file moTexture.h.
|
inline |
Definition at line 500 of file moTexture.h.
int moTextureMemory::GetReference | ( | ) |
Devuelve una referencia (internamente marca la referencia y asigna la imagen a la textura) Para liberar la memoria de opengl hay q desreferenciar...
Definition at line 1319 of file moTexture.cpp.
|
virtual |
Inicializa propiedades básicas de la textura tales como el nombre, id, administradores y parámetros.
p_name | nombre de la textura. |
p_moid | Moldeo ID de la textura. |
p_res | puntero al administrador de recursos, del cual son extraidos todos los administradores que la textura necesita (GL, Data, File, etc). |
p_param | parámetros de textura. |
Reimplemented from moTexture.
Definition at line 1100 of file moTexture.cpp.
|
virtual |
Definition at line 1106 of file moTexture.cpp.
Guarda el bitmap con el formato elegido en memoria.
if there were already something , delete it! size may be different now!!!
close memory
Calculate luminance and contrast from histogram
calculate luminance
Calculating contrast difference or luminance variance
Definition at line 1115 of file moTexture.cpp.
void moTextureMemory::ReleaseReference | ( | ) |
Libera una referencia a esta textura pudiendo de esta manera, liberar la memoria de opengl...
deleting texture from opengl memory
Definition at line 1341 of file moTexture.cpp.