Name | Description |
IsPowerOf2 | Determine wether or not a specific value is a power of two. |
Declaration bool IsPowerOf2( unsigned short v ) Parameters
Return Value
true if the value is a power of two; else return false .
|
GetNextPowerOf2 | Retrieve the next power of two of for an arbitrary value. |
Declaration unsigned short GetNextPowerOf2( unsigned short v ) Parameters
Return Value
The next power of two.
|
GetNearestPowerOf2 | Function that retrieves the closests power of two of an arbitrary value. |
Declaration unsigned short GetNearestPowerOf2( unsigned short v ) Return Value
Return the nearest power of two of the value received in parameter.
|
GetMipmapMemUsage | Return the approximated memory usage used by the mipmap pyramid associated to a specific Texture. |
Declaration unsigned int GetMipmapMemUsage( const Texture *texture ) Return Value
The amount of bytes used by the mipmap layers associated to the Texture received in parameter; if the reference to the Texture is invalid return 0 or if it does not contain mipmaps.
|
GetMipmapCount | Return the size of the mipmap pyramid for a certain pixel width and height. |
Declaration unsigned char GetMipmapCount( unsigned short width, unsigned short height ) Return Value
The amount of mipmap that the GPU will generate.
|
CpuSleep | Force the CPU thread to sleep for an amount of milliseconds. |
Declaration void CpuSleep( unsigned int milliseconds )
|
GetMilliTime | Return the amount of milliseconds elapsed since the begining of the application. |
Declaration unsigned int GetMilliTime( void ) Return Value
The current application time in milliseconds.
|
GetMicroTime | Return the amount of microseconds elapsed since the begining of the application. |
Declaration unsigned long GetMicroTime( void ) Return Value
The current application time in microsedonds.
|
IsDir | Check if a specific filepath is a valid directory. |
Declaration bool IsDir( const char *filepath ) Parameters
filepath : The filepath to check.
Return Value
false if the filepath cannot be found or if it is not a directory; else return true .
|
IsFile | Helper that confirm that a file exists. |
Declaration bool IsFile( const char *filename ) Parameters
filename : The filename to check.
Return Value
true if the filename is an actual file on disk; else return false .
|
MakeDir | Function that creates a new directory. |
Declaration bool MakeDir( const char *filepath, bool absolute ) Parameters
filepath : Filepath of the new directory.
absolute : Specify wether or not the filepath is absolute or relative.
Return Value
true on success; else return false .
|
Hash | Calculate the hash value of a string. |
Declaration unsigned int Hash( const char *src ) Parameters
Return Value
The hash value calculated for the string receive in parameter; if the string is invalid the function will return 0 .
|
Crc32 | Function that calculate the CRC of a string. |
Declaration unsigned int Crc32( const char *src ) Parameters
src : String to calculate the CRC for.
Return Value
On success returns the CRC value of the string; else return 0 if the string is invalid (nil or empty).
|
GetUID | Return a global unique identifier. |
Declaration unsigned int GetUID( void ) Return Value
A unique id.
|
FileCopy | Copy a file from one location to another. |
Declaration bool FileCopy( const char *src, const char *dst ) Parameters
src : Source filepath.
dst : Destination filepath.
Return Value
true on success; false if the file provided as source cannot be copied.
|
GetUser | Return the user directory running the application; it is a safe place to write application data. |
Declaration Return Value
The directory associated to the user running the application.
|
GetHome | Return the directory where the the application resides. |
Declaration Return Value
The home directory of the application for the device you are working on.
|
GetExtern | Return the extern directory of the application where all external files are stored or extracted. |
Declaration Return Value
The current directory where the project external files are stored/extracted.
|
| Convert a binary file to a C/C++ header file. |
GetCurrentMemory | Amount of actual memory (in bytes) your application is using. |
Declaration unsigned int GetCurrentMemory( void ) Return Value
Amount of memory used by the application.
|
GetMemoryPeak | The memory peak of your application in bytes. |
Declaration unsigned int GetMemoryPeak( void ) Return Value
The size of the memory peak.
|
PrintLegal | Print on the console or output log the licenses of the libraries used by NRG. |
Declaration
|