X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Frendertarget.cpp;h=f2f12d50c441fc70cf2439a025057dac13ff4b05;hb=328b67fa59ce6736949732ea8ff4ef7c6675e200;hp=7b603252b6e1c97f0b80ad953734147e6c8efcc2;hpb=1863f17c5c5563be8492d7f01e5c613a740ea1e9;p=libs%2Fgl.git diff --git a/source/render/rendertarget.cpp b/source/render/rendertarget.cpp index 7b603252..f2f12d50 100644 --- a/source/render/rendertarget.cpp +++ b/source/render/rendertarget.cpp @@ -148,15 +148,10 @@ void RenderTarget::init(unsigned w, unsigned h, unsigned s, const RenderTargetFo { tgt.texture = new Texture2D; tgt.texture->storage(pf, width, height, 1); - Sampler &sampler = tgt.texture->get_default_sampler(); - sampler.set_filter(NEAREST); - sampler.set_wrap(CLAMP_TO_EDGE); fbo.attach(att, *tgt.texture); } buffers.push_back(tgt); } - - fbo.require_complete(); } RenderTarget::~RenderTarget() @@ -170,15 +165,6 @@ RenderTarget::~RenderTarget() } } -void RenderTarget::set_texture_filter(TextureFilter filt) -{ - if(!samples) - { - for(vector::iterator i=buffers.begin(); i!=buffers.end(); ++i) - i->texture->get_default_sampler().set_filter(filt); - } -} - const Texture2D &RenderTarget::get_target_texture(unsigned i) const { if(i>=buffers.size()) @@ -198,11 +184,6 @@ const Texture2D &RenderTarget::get_target_texture(RenderOutput o) const return get_target_texture(index); } -void RenderTarget::blit_from(const RenderTarget &other) -{ - fbo.blit_from(other.fbo, COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT, false); -} - void RenderTarget::set_debug_name(const string &name) { #ifdef DEBUG @@ -219,9 +200,9 @@ void RenderTarget::set_debug_name(const string &name) buf_name = Msp::format("%s/color%d", name, type); if(samples) - buffers[i].buffer->set_debug_name(buf_name+".tex2d"); + buffers[i].buffer->set_debug_name(buf_name+".rbuf"); else - buffers[i].texture->set_debug_name(buf_name+".rbuf"); + buffers[i].texture->set_debug_name(buf_name+".tex2d"); } #else (void)name;