mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
gs-effect: Implement method to override the next sampler
This commit is contained in:
parent
36cd5bbf21
commit
102e4e5eeb
2 changed files with 8 additions and 1 deletions
|
@ -250,3 +250,9 @@ void GS::EffectParameter::SetTexture(std::shared_ptr<GS::Texture> v) {
|
|||
throw std::bad_cast();
|
||||
gs_effect_set_texture(m_param, v->GetObject());
|
||||
}
|
||||
|
||||
void GS::EffectParameter::SetSampler(std::shared_ptr<GS::Sampler> v) {
|
||||
if (GetType() != Type::Texture)
|
||||
throw std::bad_cast();
|
||||
gs_effect_set_next_sampler(m_param, v->GetObject());
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#pragma once
|
||||
#include "gs-texture.h"
|
||||
#include "gs-sampler.h"
|
||||
#include <inttypes.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -76,7 +77,7 @@ namespace GS {
|
|||
void SetIntegerArray(int32_t v[], size_t sz);
|
||||
void SetMatrix(matrix4& v);
|
||||
void SetTexture(std::shared_ptr<GS::Texture> v);
|
||||
void SetTextureSampler();
|
||||
void SetSampler(std::shared_ptr<GS::Sampler> v);
|
||||
|
||||
private:
|
||||
gs_eparam_t* m_param;
|
||||
|
|
Loading…
Reference in a new issue