Updated stb_image.

Removed cShapeManager ( i forgot to remove it ).
Added FileWrite function.
This commit is contained in:
spartanj
2010-08-01 19:52:38 -03:00
parent 74e6eacd15
commit b374cbc282
8 changed files with 144 additions and 270 deletions

View File

@@ -371,4 +371,22 @@ eeInt GetNumCPUs() {
return nprocs;
}
bool FileWrite( const std::string& filepath, const Uint8* data, const Uint32& dataSize ) {
std::fstream fs( filepath.c_str() , std::ios::out | std::ios::binary );
if ( fs.is_open() ) {
fs.write( reinterpret_cast<const char*> (data), dataSize );
fs.close();
return true;
}
return false;
}
bool FileWrite( const std::string& filepath, const std::vector<Uint8>& data ) {
return FileWrite( filepath, reinterpret_cast<const Uint8*> ( &data[0] ), data.size() );
}
}}