Skip to content

Commit

Permalink
BufferCreator - Creation fail message due to size not multiply by 16 …
Browse files Browse the repository at this point in the history
…contains provided buffer size
  • Loading branch information
nieznanysprawiciel committed Dec 1, 2019
1 parent f00574e commit fa8d252
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ResourceManager/AssetCreators/Buffers/BufferCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

#include "BufferCreator.h"
#include "swGraphicAPI/Resources/MeshResources.h"

#include "swCommonLib/Common/Converters.h"
#include "swCommonLib/Common/Buffers/BufferTyped.h"
#include "swCommonLib/Common/fmt.h"



Expand Down Expand Up @@ -136,7 +138,7 @@ Nullable< Buffer* > BufferCreator::CreateConstantsBuffer ( const AssetPath& na
Nullable< Buffer* > BufferCreator::CreateConstantsBuffer ( const AssetPath& name, const ConstantBufferInitData& data )
{
if( data.ElementSize % 16 != 0 )
return "[BufferCreator] Invalid Buffer size. Should be multiply of 16.";
return fmt::format( "[BufferCreator] Invalid Buffer size={}. Should be multiply of 16.", data.ElementSize );

return ResourcesFactory::CreateBufferFromMemory( name, data.Data, data.CreateBufferInfo() );
}
Expand Down

0 comments on commit fa8d252

Please sign in to comment.