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

@@ -64,10 +64,10 @@ bool cSoundBuffer::LoadFromPack( cPack* Pack, const std::string& FilePackPath )
bool cSoundBuffer::LoadFromMemory( const char* Data, std::size_t SizeInBytes ) {
// Create the sound file
std::auto_ptr<cSoundFile> File( cSoundFile::CreateRead( Data, SizeInBytes ) );
cSoundFile * File = cSoundFile::CreateRead( Data, SizeInBytes );
// Open the sound file
if ( File.get() ) {
if ( NULL != File ) {
// Get the sound parameters
std::size_t NbSamples = File->GetSamplesCount();
unsigned int ChannelsCount = File->GetChannelsCount();
@@ -80,9 +80,14 @@ bool cSoundBuffer::LoadFromMemory( const char* Data, std::size_t SizeInBytes ) {
cLog::instance()->Write( "Sound file loaded from memory." );
// Update the internal buffer with the new samples
eeDelete( File );
return Update( ChannelsCount, SampleRate );
} else {
cLog::instance()->Write( "Failed to read audio data from file in memory" );
eeDelete( File );
return false;
}
} else {