#include "model-skybox.h"
#include "model-pbr.h"
#include <dali/integration-api/debug.h>
-#include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/adaptor-framework/file-stream.h>
using namespace Dali;
using namespace Toolkit;
*/
bool LoadShaderCode( const std::string& fullpath, std::vector<char>& output )
{
- std::streampos bufferSize = 0;
- Dali::Vector<char> fileBuffer;
- if( !Dali::FileLoader::ReadFile( fullpath, bufferSize, fileBuffer, FileLoader::FileType::BINARY ) )
- {
- DALI_LOG_WARNING( "file open failed for: \"%s\"", path );
- return false;
- }
-
- FILE* file = fmemopen( &fileBuffer[0], bufferSize, "rb" );
+ Dali::FileStream fileStream( fullpath, FileStream::READ | FileStream::BINARY );
+ FILE* file = fileStream.GetFile();
if( NULL == file )
{
return false;
retValue = ( result >= 0 );
}
}
- fclose( file );
+
return retValue;
}