mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 10:06:35 +03:00
Added support for multitexture binding.
Added some functions for tex env managing. Modified some enum names from renders. Added a pixel separator for characters in the ttf creation ( optional ). Moved some OpenGL and GLEW things to cGL, this is for a future implementation with OpenGL ES and without GLEW. Tryed to fix a bad rendering bug when clipping controls with borders ( borders disappear ), i think that the hack is working. Modified some name conventions.
This commit is contained in:
@@ -455,4 +455,26 @@ std::string SizeToString( const Uint32& MemSize ) {
|
||||
return std::string( toStr( mem ) + size );
|
||||
}
|
||||
|
||||
std::wstring SizeToWString( const Uint32& MemSize ) {
|
||||
std::wstring size = L" bytes";
|
||||
eeDouble mem = static_cast<eeDouble>( MemSize );
|
||||
Uint8 c = 0;
|
||||
|
||||
while ( mem > 1024 ) {
|
||||
c++;
|
||||
mem = mem / 1024;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 0: size = L" bytes"; break;
|
||||
case 1: size = L" KB"; break;
|
||||
case 2: size = L" MB"; break;
|
||||
case 3: size = L" GB"; break;
|
||||
case 4: size = L" TB"; break;
|
||||
default: size = L" WTF";
|
||||
}
|
||||
|
||||
return std::wstring( toWStr( mem ) + size );
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user