]> git.tdb.fi Git - libs/gl.git/blobdiff - source/rendertarget.cpp
Mark some functions as const that by all rights should be
[libs/gl.git] / source / rendertarget.cpp
index 376af04877a4b324dd53518203b489c662b034c2..f575670ad3e581b574f89dfc41522385f5095b36 100644 (file)
@@ -59,7 +59,7 @@ RenderTargetFormat RenderTargetFormat::operator,(PixelFormat f) const
        return result;
 }
 
-int RenderTargetFormat::index(RenderOutput o)
+int RenderTargetFormat::index(RenderOutput o) const
 {
        unsigned type = get_output_type(o);
        unsigned i = 0;
@@ -155,7 +155,7 @@ RenderTarget::~RenderTarget()
        }
 }
 
-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");
@@ -165,7 +165,7 @@ const Texture2D &RenderTarget::get_target_texture(unsigned i)
        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)