mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
gs-effect: Fix assigning of Integer and Float arrays
This commit is contained in:
parent
6ce68e5f15
commit
67099c2b23
1 changed files with 2 additions and 2 deletions
|
@ -201,7 +201,7 @@ void GS::EffectParameter::SetFloat4(float_t x, float_t y, float_t z, float_t w)
|
|||
}
|
||||
|
||||
void GS::EffectParameter::SetFloatArray(float_t v[], size_t sz) {
|
||||
if (GetType() != Type::Float)
|
||||
if ((GetType() != Type::Float) && (GetType() != Type::Float2) && (GetType() != Type::Float3) && (GetType() != Type::Float4))
|
||||
throw std::bad_cast();
|
||||
gs_effect_set_val(m_param, v, sz);
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ void GS::EffectParameter::SetInteger4(int32_t x, int32_t y, int32_t z, int32_t w
|
|||
}
|
||||
|
||||
void GS::EffectParameter::SetIntegerArray(int32_t v[], size_t sz) {
|
||||
if (GetType() != Type::Integer)
|
||||
if ((GetType() != Type::Integer) && (GetType() != Type::Integer2) && (GetType() != Type::Integer3) && (GetType() != Type::Integer4))
|
||||
throw std::bad_cast();
|
||||
gs_effect_set_val(m_param, v, sz);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue