feat(render): dynamic OpenGL/Vulkan backend split and backend-neutral viewer

- Extract libolive-rendercore static library to minimize backend link boundary.
- Add DynamicRenderer adapter with C ABI (oakgl/oakvulkan shared libs).
- Make OAK_ENABLE_DYNAMIC_RENDER_BACKEND default ON with OpenGL fallback.
- Implement VulkanRenderer prototype (textures, shaders, UBO blit, readback).
- Add backend-neutral viewer readback path (offscreen -> QImage -> QPainter).
- Refactor PluginRenderer to be renderer-agnostic; OFX plugins fall back to CPU
  path on non-OpenGL backends while preserving OpenGL render path.
- Add Renderer::AttachOutputTexture/DetachOutputTexture and C ABI forwards.
- Update docs/zh/render-backend-dynamic-plan.md for Phase 3/4/5.
This commit is contained in:
2026-07-13 10:19:29 +08:00
parent 5fc8232671
commit 225f8505c2
42 changed files with 3042 additions and 495 deletions
+31 -4
View File
@@ -29,12 +29,15 @@
#include <memory>
#include "common/define.h"
#include "node/node.h"
#include "render/colorprocessor.h"
#include "render/job/colortransformjob.h"
#include "render/shadercode.h"
#include "render/videoparams.h"
#include "texture.h"
#include "job/pluginjob.h"
// Forward declarations to keep the render core header lightweight
namespace olive {
class ColorTransformJob;
class Node;
}
namespace olive
{
@@ -117,6 +120,30 @@ public:
return lifetime_;
}
virtual bool IsOpenGL() const
{
return false;
}
/**
* @brief Attach a texture as the current output destination for OFX plugin
* OpenGL rendering.
*
* Default implementation is a no-op. OpenGL-based renderers override this
* to bind the texture as a framebuffer render target.
*/
virtual void AttachOutputTexture(olive::Texture *texture)
{
(void)texture;
}
/**
* @brief Detach the current OFX plugin OpenGL output texture.
*
* Default implementation is a no-op.
*/
virtual void DetachOutputTexture() {}
protected:
virtual void Blit(QVariant shader, olive::AcceleratedJob& job,
olive::Texture *destination,