summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsTools
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-05-06 04:30:52 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-05-06 04:30:52 +0000
commit46f46298199a1241a8e760e0ca6f69644e1cb319 (patch)
tree0def7cae5ebf06a764c54f88e96eddceef249687 /Graphics/GraphicsTools
parentMinor change (diff)
downloadDiligentCore-46f46298199a1241a8e760e0ca6f69644e1cb319.tar.gz
DiligentCore-46f46298199a1241a8e760e0ca6f69644e1cb319.zip
Added AddShaderMacro<> specialization for uints
Diffstat (limited to 'Graphics/GraphicsTools')
-rw-r--r--Graphics/GraphicsTools/include/ShaderMacroHelper.h9
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() );
+}
+
}