From c89dc67a06bee0bf5b4a737ee7107bad18b4413c Mon Sep 17 00:00:00 2001 From: Phil Barrett Date: Tue, 4 Nov 2025 17:08:49 +0000 Subject: [PATCH] issue #212 Add kOfxImageEffectPropCPURenderSupported Signed-off-by: Phil Barrett --- Examples/OpenGL/opengl.cpp | 3 +++ include/ofxGPURender.h | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Examples/OpenGL/opengl.cpp b/Examples/OpenGL/opengl.cpp index bbcfe1eb..cb33e6cd 100644 --- a/Examples/OpenGL/opengl.cpp +++ b/Examples/OpenGL/opengl.cpp @@ -563,6 +563,9 @@ describe(OfxImageEffectHandle effect) // we support OpenGL rendering (could also say "needed" here) gPropHost->propSetString(effectProps, kOfxImageEffectPropOpenGLRenderSupported, 0, "true"); + // we do NOT support CPU rendering + gPropHost->propSetString(effectProps, kOfxImageEffectPropCPURenderSupported, 0, "false"); + { char *s = NULL; stat = gPropHost->propGetString(gHost->host, kOfxImageEffectPropOpenGLRenderSupported, 0, &s); diff --git a/include/ofxGPURender.h b/include/ofxGPURender.h index 1fc21125..a60633f7 100644 --- a/include/ofxGPURender.h +++ b/include/ofxGPURender.h @@ -150,6 +150,22 @@ texture by the host #define kOfxImageEffectPropOpenGLTextureTarget "OfxImageEffectPropOpenGLTextureTarget" +/** @brief Indicates whether a host or plug-in can (or more importantly cannot) + support CPU rendering. + + - Type - C string X 1 + - Property Set - plug-in descriptor (read/write), host descriptor (read +only) - plug-in instance change (read/write) + - Default - "true" for host and plug-in + - Valid Values - This must be one of + - "false" - in which case the host or plug-in does not support CPU + rendering + - "true" - which means a host or plug-in can support CPU rendering + +*/ +#define kOfxImageEffectPropCPURenderSupported "OfxImageEffectPropCPURenderSupported" + + /** @name StatusReturnValues OfxStatus returns indicating that a OpenGL render error has occurred: