feat(oakplugin): GL render bridge, color picker, push-button action, worker progress, Interact host
- gl_bridge: macOS CGL offscreen context (process-wide singleton, serialized GlGuard), real GL output textures/FBOs, glReadPixels readback with vertical flip and format conversion; use_opengl now really engages for OpenGLRenderSupported plugins (verified with real GL rendering: C smoke 11/11, unit tests, GL e2e). - OfxColor: color params get a swatch button plus a real picker popup (RGBA sliders, live preview, hex input, undoable commit) replacing the four spinboxes. - Push buttons route kOfxActionInstanceChanged (UserEdited) per the OFX contract; test plugin asserts the callback. - Worker-side plugin progress flows to the main-process progress dialog over the NDJSON control channel, with cancel propagation. - OFX Interact host: NewInteract/Describe lifecycle, Draw/Pen/Key/Idle action surface with proper in-args, DrawSuite v1 host implementation sharing the gl_bridge context; interact test plugin verifies the event stream and real GL drawing.
This commit is contained in:
@@ -46,15 +46,22 @@ fn build_test_plugin() {
|
||||
} else {
|
||||
("-shared", "so")
|
||||
};
|
||||
let mut args = vec![
|
||||
"-fPIC".to_string(),
|
||||
"-Iofx".to_string(),
|
||||
"cbits/oak_test_plugin.c".to_string(),
|
||||
link_flag.to_string(),
|
||||
"-o".to_string(),
|
||||
format!("{out}/oak_test_plugin.{ext}"),
|
||||
];
|
||||
// GL 端到端测试:插件 GL 变体在 macOS 上真实绘制(glClear),需要
|
||||
// OpenGL.framework。
|
||||
if cfg!(target_os = "macos") {
|
||||
args.push("-framework".into());
|
||||
args.push("OpenGL".into());
|
||||
}
|
||||
let status = Command::new(&cc)
|
||||
.args([
|
||||
"-fPIC",
|
||||
"-Iofx",
|
||||
"cbits/oak_test_plugin.c",
|
||||
link_flag,
|
||||
"-o",
|
||||
&format!("{out}/oak_test_plugin.{ext}"),
|
||||
])
|
||||
.args(&args)
|
||||
.status()
|
||||
.expect("编译测试插件失败");
|
||||
assert!(status.success(), "测试插件编译失败");
|
||||
|
||||
Reference in New Issue
Block a user