diff options
Diffstat (limited to 'Graphics/GraphicsTools')
| -rw-r--r-- | Graphics/GraphicsTools/include/ShaderMacroHelper.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Graphics/GraphicsTools/include/ShaderMacroHelper.h b/Graphics/GraphicsTools/include/ShaderMacroHelper.h index e07a1d6f..811f1886 100644 --- a/Graphics/GraphicsTools/include/ShaderMacroHelper.h +++ b/Graphics/GraphicsTools/include/ShaderMacroHelper.h @@ -130,4 +130,13 @@ inline void ShaderMacroHelper::AddShaderMacro( const Diligent::Char* Name, float AddShaderMacro<const Diligent::Char*>( Name, ss.str().c_str() ); } +template<> +inline void ShaderMacroHelper::AddShaderMacro( const Diligent::Char* Name, Uint32 Definition ) +{ + // Make sure that uint constants have the 'u' suffix to avoid problems in GLES. + std::ostringstream ss; + ss << Definition << 'u'; + AddShaderMacro<const Diligent::Char*>( Name, ss.str().c_str() ); +} + } |
