mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-13 07:15:06 +00:00
util-source-texture: Add method to retrieve obs_source_t* obejct
This commit is contained in:
parent
75aeb561bd
commit
224544efff
2 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,10 @@ util::SourceTexture::SourceTexture() {
|
||||||
m_rt = std::make_shared<GS::RenderTarget>(GS_RGBA, GS_ZS_NONE);
|
m_rt = std::make_shared<GS::RenderTarget>(GS_RGBA, GS_ZS_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
obs_source_t* util::SourceTexture::GetObject() {
|
||||||
|
return m_source;
|
||||||
|
}
|
||||||
|
|
||||||
util::SourceTexture::SourceTexture(const char* name) : SourceTexture() {
|
util::SourceTexture::SourceTexture(const char* name) : SourceTexture() {
|
||||||
m_source = obs_get_source_by_name(name);
|
m_source = obs_get_source_by_name(name);
|
||||||
if (!m_source) {
|
if (!m_source) {
|
||||||
|
|
|
@ -34,6 +34,8 @@ namespace util {
|
||||||
SourceTexture(std::string name);
|
SourceTexture(std::string name);
|
||||||
SourceTexture(obs_source_t* src);
|
SourceTexture(obs_source_t* src);
|
||||||
|
|
||||||
|
obs_source_t* GetObject();
|
||||||
|
|
||||||
std::shared_ptr<GS::Texture> Render(size_t width, size_t height);
|
std::shared_ptr<GS::Texture> Render(size_t width, size_t height);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue