From 71900e6752129d6122b2946858cf2f1fa378fd36 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 5 Nov 2017 21:50:38 +0100 Subject: [PATCH] gs-effect: Allow retrieving effect parameter name --- source/gs-effect.cpp | 4 ++++ source/gs-effect.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/gs-effect.cpp b/source/gs-effect.cpp index 3ba0663..d3bc1ef 100644 --- a/source/gs-effect.cpp +++ b/source/gs-effect.cpp @@ -107,6 +107,10 @@ GS::EffectParameter::EffectParameter(gs_eparam_t* param) { gs_effect_get_param_info(m_param, &m_paramInfo); } +std::string GS::EffectParameter::GetName() { + return m_paramInfo.name; +} + GS::EffectParameter::Type GS::EffectParameter::GetType() { switch (m_paramInfo.type) { case GS_SHADER_PARAM_BOOL: diff --git a/source/gs-effect.h b/source/gs-effect.h index 2878e43..acb1ee2 100644 --- a/source/gs-effect.h +++ b/source/gs-effect.h @@ -55,7 +55,8 @@ namespace GS { public: EffectParameter(gs_eparam_t* param); - + + std::string GetName(); Type GetType(); void SetBoolean(bool v);