return result;
}
-int RenderTargetFormat::index(RenderOutput o)
+int RenderTargetFormat::index(RenderOutput o) const
{
unsigned type = get_output_type(o);
unsigned i = 0;
}
}
-const Texture2D &RenderTarget::get_target_texture(unsigned i)
+const Texture2D &RenderTarget::get_target_texture(unsigned i) const
{
if(i>=buffers.size())
throw out_of_range("RenderTarget::get_target_texture");
return *buffers[i].texture;
}
-const Texture2D &RenderTarget::get_target_texture(RenderOutput o)
+const Texture2D &RenderTarget::get_target_texture(RenderOutput o) const
{
int index = format.index(o);
if(index<0)
bool empty() const { return !count; }
const unsigned char *begin() const { return outputs; }
const unsigned char *end() const { return outputs+count; }
- int index(RenderOutput);
+ int index(RenderOutput) const;
};
inline RenderTargetFormat operator,(RenderOutput o1, RenderOutput o2)
const RenderTargetFormat &get_format() const { return format; }
Framebuffer &get_framebuffer() { return fbo; }
- const Texture2D &get_target_texture(unsigned);
- const Texture2D &get_target_texture(RenderOutput);
+ const Texture2D &get_target_texture(unsigned) const;
+ const Texture2D &get_target_texture(RenderOutput) const;
void blit_from(const RenderTarget &);
};