MCPcopy Create free account
hub / github.com/NatronGitHub/openfx-misc / render

Method render

VectorToColor/VectorToColor.cpp:344–376  ·  view source on GitHub ↗

the overridden render function

Source from the content-addressed store, hash-verified

342
343// the overridden render function
344void
345VectorToColorPlugin::render(const RenderArguments &args)
346{
347 // instantiate the render code based on the pixel depth of the dst clip
348 BitDepthEnum dstBitDepth = _dstClip->getPixelDepth();
349 PixelComponentEnum dstComponents = _dstClip->getPixelComponents();
350
351 assert( kSupportsMultipleClipPARs || !_srcClip || !_srcClip->isConnected() || _srcClip->getPixelAspectRatio() == _dstClip->getPixelAspectRatio() );
352 assert( kSupportsMultipleClipDepths || !_srcClip || !_srcClip->isConnected() || _srcClip->getPixelDepth() == _dstClip->getPixelDepth() );
353 assert(dstComponents == ePixelComponentRGB || dstComponents == ePixelComponentRGBA);
354 if (dstComponents == ePixelComponentRGBA) {
355 switch (dstBitDepth) {
356 case eBitDepthFloat: {
357 VectorToColorProcessor<float, 4, 1> fred(*this);
358 setupAndProcess(fred, args);
359 break;
360 }
361 default:
362 throwSuiteStatusException(kOfxStatErrUnsupported);
363 }
364 } else {
365 assert(dstComponents == ePixelComponentRGB);
366 switch (dstBitDepth) {
367 case eBitDepthFloat: {
368 VectorToColorProcessor<float, 3, 1> fred(*this);
369 setupAndProcess(fred, args);
370 break;
371 }
372 default:
373 throwSuiteStatusException(kOfxStatErrUnsupported);
374 }
375 }
376}
377
378mDeclarePluginFactory(VectorToColorPluginFactory, {ofxsThreadSuiteCheck();}, {});
379void

Callers

nothing calls this directly

Calls 1

isConnectedMethod · 0.80

Tested by

no test coverage detected