mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-14 07:45:06 +00:00
gs: Leave GS context and then return texture
This fixes a hang when calling GetTextureObject() on a GS::RenderTarget.
This commit is contained in:
parent
3899476a7f
commit
6a208ed215
1 changed files with 2 additions and 1 deletions
|
@ -44,8 +44,9 @@ GS::RenderTargetOp GS::RenderTarget::Render(uint32_t width, uint32_t height) {
|
||||||
|
|
||||||
gs_texture_t* GS::RenderTarget::GetTextureObject() {
|
gs_texture_t* GS::RenderTarget::GetTextureObject() {
|
||||||
obs_enter_graphics();
|
obs_enter_graphics();
|
||||||
return gs_texrender_get_texture(m_renderTarget);
|
gs_texture_t* tex = gs_texrender_get_texture(m_renderTarget);
|
||||||
obs_leave_graphics();
|
obs_leave_graphics();
|
||||||
|
return tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
GS::RenderTargetOp::RenderTargetOp(GS::RenderTarget* rt, uint32_t width, uint32_t height) : m_renderTarget(rt) {
|
GS::RenderTargetOp::RenderTargetOp(GS::RenderTarget* rt, uint32_t width, uint32_t height) : m_renderTarget(rt) {
|
||||||
|
|
Loading…
Reference in a new issue