MCPcopy Create free account
hub / github.com/Kitware/VTK / Render

Method Render

Rendering/Parallel/vtkCompositeRGBAPass.cxx:120–502  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Perform rendering according to a render state \p s. \pre s_exists: s!=0

Source from the content-addressed store, hash-verified

118// Perform rendering according to a render state \p s.
119// \pre s_exists: s!=0
120void vtkCompositeRGBAPass::Render(const vtkRenderState* s)
121{
122 assert("pre: s_exists" && s != nullptr);
123
124 if (this->Controller == nullptr)
125 {
126 vtkErrorMacro(<< " no controller.");
127 return;
128 }
129
130 int numProcs = this->Controller->GetNumberOfProcesses();
131
132 if (numProcs == 1)
133 {
134 return; // nothing to do.
135 }
136
137 if (this->Kdtree == nullptr)
138 {
139 vtkErrorMacro(<< " no Kdtree.");
140 return;
141 }
142
143 int me = this->Controller->GetLocalProcessId();
144
145 constexpr int VTK_COMPOSITE_RGBA_PASS_MESSAGE_GATHER = 201;
146
147 vtkOpenGLRenderer* r = static_cast<vtkOpenGLRenderer*>(s->GetRenderer());
148
149 vtkOpenGLRenderWindow* context = static_cast<vtkOpenGLRenderWindow*>(r->GetRenderWindow());
150 vtkOpenGLState* ostate = context->GetState();
151
152 if (!this->IsSupported(context))
153 {
154 vtkErrorMacro(<< "Missing required OpenGL extensions. "
155 << "Cannot perform rgba-compositing.");
156 return;
157 }
158
159 int w = 0;
160 int h = 0;
161
162 vtkFrameBufferObjectBase* fbo = s->GetFrameBuffer();
163 if (fbo == nullptr)
164 {
165 r->GetTiledSize(&w, &h);
166 }
167 else
168 {
169 int size[2];
170 fbo->GetLastSize(size);
171 w = size[0];
172 h = size[1];
173 }
174
175 int numComps = 4;
176 unsigned int numTups = w * h;
177

Callers

nothing calls this directly

Calls 15

IsSupportedMethod · 0.95
GetNumberOfProcessesMethod · 0.80
GetFrameBufferMethod · 0.80
GetTiledSizeMethod · 0.80
CopyImportVoidPointerMethod · 0.80
SetShiftMethod · 0.80
GetActiveCameraMethod · 0.80
vtkglColorMaskMethod · 0.80
vtkglDisableMethod · 0.80

Tested by

no test coverage detected