Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersProg.cpp')
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index c8a68c70c4d..11f64aa4d6a 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -23,18 +23,17 @@
#include "DNA_scene_types.h"
#include "RE_pipeline.h"
-#include "RE_render_ext.h"
-#include "RE_shader_ext.h"
+#include "RE_texture.h"
/* ******** Render Layers Base Prog ******** */
RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elementsize)
- : NodeOperation(), m_passName(passName)
+ : m_passName(passName)
{
- this->setScene(NULL);
- this->m_inputBuffer = NULL;
+ this->setScene(nullptr);
+ this->m_inputBuffer = nullptr;
this->m_elementsize = elementsize;
- this->m_rd = NULL;
+ this->m_rd = nullptr;
this->addOutputSocket(type);
}
@@ -42,8 +41,8 @@ RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elem
void RenderLayersProg::initExecution()
{
Scene *scene = this->getScene();
- Render *re = (scene) ? RE_GetSceneRender(scene) : NULL;
- RenderResult *rr = NULL;
+ Render *re = (scene) ? RE_GetSceneRender(scene) : nullptr;
+ RenderResult *rr = nullptr;
if (re) {
rr = RE_AcquireResultRead(re);
@@ -62,7 +61,7 @@ void RenderLayersProg::initExecution()
}
if (re) {
RE_ReleaseResult(re);
- re = NULL;
+ re = nullptr;
}
}
@@ -157,7 +156,7 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
}
#endif
- if (this->m_inputBuffer == NULL) {
+ if (this->m_inputBuffer == nullptr) {
int elemsize = this->m_elementsize;
if (elemsize == 1) {
output[0] = 0.0f;
@@ -177,15 +176,15 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
void RenderLayersProg::deinitExecution()
{
- this->m_inputBuffer = NULL;
+ this->m_inputBuffer = nullptr;
}
void RenderLayersProg::determineResolution(unsigned int resolution[2],
unsigned int /*preferredResolution*/[2])
{
Scene *sce = this->getScene();
- Render *re = (sce) ? RE_GetSceneRender(sce) : NULL;
- RenderResult *rr = NULL;
+ Render *re = (sce) ? RE_GetSceneRender(sce) : nullptr;
+ RenderResult *rr = nullptr;
resolution[0] = 0;
resolution[1] = 0;
@@ -217,7 +216,7 @@ void RenderLayersAOOperation::executePixelSampled(float output[4],
PixelSampler sampler)
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
zero_v3(output);
}
else {
@@ -234,7 +233,7 @@ void RenderLayersAlphaProg::executePixelSampled(float output[4],
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -254,7 +253,7 @@ void RenderLayersDepthProg::executePixelSampled(float output[4],
int iy = y;
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() ||
+ if (inputBuffer == nullptr || ix < 0 || iy < 0 || ix >= (int)this->getWidth() ||
iy >= (int)this->getHeight()) {
output[0] = 10e10f;
}