From 55596e9da91f3657d77a386cae3eecc15dd1568f Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 6 Sep 2013 12:16:24 +0200 Subject: [PATCH] Rename 'RB'(renderbuffer) to 'RBO'(renderbuffer object) --- src/gl-util.h | 30 +++++++++++++++--------------- src/graphics.cpp | 14 +++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/gl-util.h b/src/gl-util.h index ce7db54..8af4ac1 100644 --- a/src/gl-util.h +++ b/src/gl-util.h @@ -116,7 +116,7 @@ namespace Tex } } -namespace RB +namespace RBO { DEF_GL_ID @@ -195,7 +195,7 @@ namespace FBO glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + colorAttach, GL_TEXTURE_2D, texTarget.gl, 0); } - inline void setRBTarget(RB::ID rbTarget, unsigned colorAttach = 0) + inline void setRBOTarget(RBO::ID rbTarget, unsigned colorAttach = 0) { glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + colorAttach, GL_RENDERBUFFER, rbTarget.gl); } @@ -348,40 +348,40 @@ struct TexFBO } }; -struct RBFBO +struct RBOFBO { - RB::ID rb; + RBO::ID rbo; FBO::ID fbo; int width, height; - RBFBO() - : rb(0), fbo(0), width(0), height(0) + RBOFBO() + : rbo(0), fbo(0), width(0), height(0) {} - static inline void init(RBFBO &obj) + static inline void init(RBOFBO &obj) { - obj.rb = RB::gen(); + obj.rbo = RBO::gen(); obj.fbo = FBO::gen(); } - static inline void allocEmpty(RBFBO &obj, int width, int height) + static inline void allocEmpty(RBOFBO &obj, int width, int height) { - RB::bind(obj.rb); - RB::allocEmpty(width, height); + RBO::bind(obj.rbo); + RBO::allocEmpty(width, height); obj.width = width; obj.height = height; } - static inline void linkFBO(RBFBO &obj) + static inline void linkFBO(RBOFBO &obj) { FBO::bind(obj.fbo); - FBO::setRBTarget(obj.rb); + FBO::setRBOTarget(obj.rbo); } - static inline void fini(RBFBO &obj) + static inline void fini(RBOFBO &obj) { FBO::del(obj.fbo); - RB::del(obj.rb); + RBO::del(obj.rbo); } }; diff --git a/src/graphics.cpp b/src/graphics.cpp index 09433e8..5c0c8f6 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -469,7 +469,7 @@ struct GraphicsPrivate TexFBO frozenScene; TexFBO currentScene; Quad screenQuad; - RBFBO transBuffer; + RBOFBO transBuffer; GraphicsPrivate() : scRes(640, 480), @@ -494,9 +494,9 @@ struct GraphicsPrivate FloatRect screenRect(0, 0, scRes.x, scRes.y); screenQuad.setTexPosRect(screenRect, screenRect); - RBFBO::init(transBuffer); - RBFBO::allocEmpty(transBuffer, scRes.x, scRes.y); - RBFBO::linkFBO(transBuffer); + RBOFBO::init(transBuffer); + RBOFBO::allocEmpty(transBuffer, scRes.x, scRes.y); + RBOFBO::linkFBO(transBuffer); } ~GraphicsPrivate() @@ -504,7 +504,7 @@ struct GraphicsPrivate TexFBO::fini(frozenScene); TexFBO::fini(currentScene); - RBFBO::fini(transBuffer); + RBOFBO::fini(transBuffer); } void updateScreenResoRatio() @@ -792,8 +792,8 @@ void Graphics::resizeScreen(int width, int height) FloatRect screenRect(0, 0, width, height); p->screenQuad.setTexPosRect(screenRect, screenRect); - RB::bind(p->transBuffer.rb); - RB::allocEmpty(width, height); + RBO::bind(p->transBuffer.rbo); + RBO::allocEmpty(width, height); p->updateScreenResoRatio(); }