diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
commit | 6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch) | |
tree | 0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp | |
parent | 7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff) |
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp index f27af3c25f5..e4543c06d9b 100644 --- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp @@ -33,10 +33,10 @@ extern "C" { RenderLayersBaseProg::RenderLayersBaseProg(int renderpass, int elementsize) : NodeOperation() { - this->renderpass = renderpass; + this->m_renderpass = renderpass; this->setScene(NULL); - this->inputBuffer = NULL; - this->elementsize = elementsize; + this->m_inputBuffer = NULL; + this->m_elementsize = elementsize; } @@ -55,10 +55,10 @@ void RenderLayersBaseProg::initExecution() RenderLayer *rl = RE_GetRenderLayer(rr, srl->name); if (rl && rl->rectf) { - this->inputBuffer = RE_RenderLayerGetPass(rl, renderpass); + this->m_inputBuffer = RE_RenderLayerGetPass(rl, this->m_renderpass); - if (this->inputBuffer == NULL || renderpass == SCE_PASS_COMBINED) { - this->inputBuffer = rl->rectf; + if (this->m_inputBuffer == NULL || this->m_renderpass == SCE_PASS_COMBINED) { + this->m_inputBuffer = rl->rectf; } } } @@ -74,38 +74,30 @@ void RenderLayersBaseProg::executePixel(float *output, float x, float y, PixelSa int ix = x; int iy = y; - if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) { - output[0] = 0.0f; - output[1] = 0.0f; - output[2] = 0.0f; - output[3] = 0.0f; + if (this->m_inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) { + zero_v4(output); } else { - unsigned int offset = (iy * this->getWidth() + ix) * elementsize; - if (elementsize == 1) { - output[0] = inputBuffer[offset]; + unsigned int offset = (iy * this->getWidth() + ix) * this->m_elementsize; + if (this->m_elementsize == 1) { + output[0] = this->m_inputBuffer[offset]; output[1] = 0.0f; output[2] = 0.0f; output[3] = 0.0f; } - else if (elementsize == 3) { - output[0] = inputBuffer[offset]; - output[1] = inputBuffer[offset + 1]; - output[2] = inputBuffer[offset + 2]; + else if (this->m_elementsize == 3) { + copy_v3_v3(output, &this->m_inputBuffer[offset]); output[3] = 1.0f; } else { - output[0] = inputBuffer[offset]; - output[1] = inputBuffer[offset + 1]; - output[2] = inputBuffer[offset + 2]; - output[3] = inputBuffer[offset + 3]; + copy_v4_v4(output, &this->m_inputBuffer[offset]); } } } void RenderLayersBaseProg::deinitExecution() { - this->inputBuffer = NULL; + this->m_inputBuffer = NULL; } void RenderLayersBaseProg::determineResolution(unsigned int resolution[], unsigned int preferredResolution[]) |