diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-04-19 16:46:52 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-04-19 16:46:52 -0300 |
commit | a4c1fa12a54df2fe332db2ab08a03c844e4dcc93 (patch) | |
tree | 0e3fa1b801c174b1e56d81d2744be05361fbcd46 /scene/main | |
parent | 0360b454a432dc851cc1c5b0c365049ebafcec46 (diff) |
heck
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 11 | ||||
-rw-r--r-- | scene/main/viewport.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index c13b4eb060..0bbc2dc695 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -67,16 +67,25 @@ bool RenderTargetTexture::has_alpha() const{ void RenderTargetTexture::set_flags(uint32_t p_flags){ + ERR_FAIL_COND(!vp); + if (p_flags&FLAG_FILTER) + flags=FLAG_FILTER; + else + flags=0; + + VS::get_singleton()->texture_set_flags(vp->render_target_texture_rid,flags); } + uint32_t RenderTargetTexture::get_flags() const{ - return 0; + return flags; } RenderTargetTexture::RenderTargetTexture(Viewport *p_vp){ vp=p_vp; + flags=0; } diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 178a7517f0..cc7f93cfa3 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -45,6 +45,7 @@ class RenderTargetTexture : public Texture { OBJ_TYPE( RenderTargetTexture, Texture ); + int flags; friend class Viewport; Viewport *vp; |