From ba3b904f346a1479236d1ec0bc9fb53bb97f5311 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 6 Sep 2013 12:22:55 +0200 Subject: [PATCH] Thanks to the ID abstraction, we can use proper overloading now! --- src/gl-util.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gl-util.h b/src/gl-util.h index 8af4ac1..52dc288 100644 --- a/src/gl-util.h +++ b/src/gl-util.h @@ -190,14 +190,14 @@ namespace FBO bind(ID(0), mode); } - inline void setTexTarget(Tex::ID texTarget, unsigned colorAttach = 0) + inline void setTarget(Tex::ID target, unsigned colorAttach = 0) { - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + colorAttach, GL_TEXTURE_2D, texTarget.gl, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + colorAttach, GL_TEXTURE_2D, target.gl, 0); } - inline void setRBOTarget(RBO::ID rbTarget, unsigned colorAttach = 0) + inline void setTarget(RBO::ID target, unsigned colorAttach = 0) { - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + colorAttach, GL_RENDERBUFFER, rbTarget.gl); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + colorAttach, GL_RENDERBUFFER, target.gl); } inline void blit(int srcX, int srcY, @@ -338,7 +338,7 @@ struct TexFBO static inline void linkFBO(TexFBO &obj) { FBO::bind(obj.fbo); - FBO::setTexTarget(obj.tex); + FBO::setTarget(obj.tex); } static inline void fini(TexFBO &obj) @@ -375,7 +375,7 @@ struct RBOFBO static inline void linkFBO(RBOFBO &obj) { FBO::bind(obj.fbo); - FBO::setRBOTarget(obj.rbo); + FBO::setTarget(obj.rbo); } static inline void fini(RBOFBO &obj)