Added Vertex Buffer support ( cVertexBuffer base class (interface), cVertexBufferOGL fallback if gpu doesn't support VBO's, cVertexBufferVBO uses ARB Vertex Buffer Object ).

Added a Memory Manager to trace memory leaks.
Fixed some memory leaks detected with the new memory manager.
Added an allocator for STL ( to use it with the custom allocation seted in the memory manager ).
Fixed Makefiles ( i wroke them ).
This commit is contained in:
spartanj
2010-09-03 02:53:14 -03:00
parent d9bd5d763f
commit f8703cd568
60 changed files with 1279 additions and 254 deletions

View File

@@ -421,13 +421,38 @@ std::string SaveTypeToExtension( const Uint32& Format ) {
}
void DirPathAddSlashAtEnd( std::string& path ) {
if ( path[ path.size() - 1 ] != '/' && path[ path.size() - 1 ] != '\\' ) {
if ( path[ path.size() - 1 ] != '/' && path[ path.size() - 1 ] != '\\' )
path += GetOSlash();
}
std::string GetOSlash() {
#if EE_PLATFORM == EE_PLATFORM_WIN32
path += '\\';
return std::string( "\\" );
#else
path += '/';
return std::string( "/" );
#endif
}
std::string SizeToString( const Uint32& MemSize ) {
std::string size = " bytes";
eeDouble mem = static_cast<eeDouble>( MemSize );
Uint8 c = 0;
while ( mem > 1024 ) {
c++;
mem = mem / 1024;
}
switch (c) {
case 0: size = " bytes"; break;
case 1: size = " KB"; break;
case 2: size = " MB"; break;
case 3: size = " GB"; break;
case 4: size = " TB"; break;
default: size = " WTF";
}
return std::string( toStr( mem ) + size );
}
}}