Blender  V2.93
COM_ImageOperation.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #pragma once
20 
21 #include "BKE_image.h"
22 #include "BLI_listbase.h"
23 #include "BLI_utildefines.h"
24 #include "COM_NodeOperation.h"
25 #include "MEM_guardedalloc.h"
26 
27 #include "RE_pipeline.h"
28 #include "RE_texture.h"
29 
30 namespace blender::compositor {
31 
36  protected:
41  unsigned int *m_imageByteBuffer;
42  float *m_depthBuffer;
47  const RenderData *m_rd;
48  const char *m_viewName;
49 
54  void determineResolution(unsigned int resolution[2],
55  unsigned int preferredResolution[2]) override;
56 
57  virtual ImBuf *getImBuf();
58 
59  public:
60  void initExecution() override;
61  void deinitExecution() override;
62  void setImage(Image *image)
63  {
64  this->m_image = image;
65  }
66  void setImageUser(ImageUser *imageuser)
67  {
68  this->m_imageUser = imageuser;
69  }
70  void setRenderData(const RenderData *rd)
71  {
72  this->m_rd = rd;
73  }
74  void setViewName(const char *viewName)
75  {
76  this->m_viewName = viewName;
77  }
78  void setFramenumber(int framenumber)
79  {
80  this->m_framenumber = framenumber;
81  }
82 };
84  public:
89  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
90 };
92  public:
97  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
98 };
100  public:
105  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
106 };
107 
108 } // namespace blender::compositor
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
#define output
Base class for all image operations.
void setViewName(const char *viewName)
void setImageUser(ImageUser *imageuser)
void setRenderData(const RenderData *rd)
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
NodeOperation contains calculation logic.