gs-effect: Allow retrieving effect parameter name

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2017-11-05 21:50:38 +01:00
parent 4b364865a1
commit 71900e6752
2 changed files with 6 additions and 1 deletions

View file

@ -107,6 +107,10 @@ GS::EffectParameter::EffectParameter(gs_eparam_t* param) {
gs_effect_get_param_info(m_param, &m_paramInfo); gs_effect_get_param_info(m_param, &m_paramInfo);
} }
std::string GS::EffectParameter::GetName() {
return m_paramInfo.name;
}
GS::EffectParameter::Type GS::EffectParameter::GetType() { GS::EffectParameter::Type GS::EffectParameter::GetType() {
switch (m_paramInfo.type) { switch (m_paramInfo.type) {
case GS_SHADER_PARAM_BOOL: case GS_SHADER_PARAM_BOOL:

View file

@ -55,7 +55,8 @@ namespace GS {
public: public:
EffectParameter(gs_eparam_t* param); EffectParameter(gs_eparam_t* param);
std::string GetName();
Type GetType(); Type GetType();
void SetBoolean(bool v); void SetBoolean(bool v);