summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp11
-rw-r--r--scene/main/viewport.h1
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;