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:
@@ -101,6 +101,32 @@ private slots:
|
||||
MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR_INNER; \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Inner widget for backend-neutral rendering paths (e.g. Vulkan).
|
||||
*
|
||||
* It does not own a GL context; instead it forwards Qt paint events to the
|
||||
* ManagedDisplayWidget so that the viewer can render via QPainter.
|
||||
*/
|
||||
class ManagedDisplayWidgetBackendNeutral : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ManagedDisplayWidgetBackendNeutral(QWidget *parent = nullptr)
|
||||
: QWidget(parent)
|
||||
{
|
||||
}
|
||||
|
||||
signals:
|
||||
void OnPaint();
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *event) override
|
||||
{
|
||||
QWidget::paintEvent(event);
|
||||
|
||||
emit OnPaint();
|
||||
}
|
||||
};
|
||||
|
||||
class ManagedDisplayWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -221,6 +247,11 @@ protected:
|
||||
|
||||
void SetInnerMouseTracking(bool e);
|
||||
|
||||
bool IsBackendNeutral() const
|
||||
{
|
||||
return is_backend_neutral_;
|
||||
}
|
||||
|
||||
QRect GetInnerRect() const
|
||||
{
|
||||
return wrapper_ ? wrapper_->rect() : QRect();
|
||||
@@ -285,6 +316,8 @@ private:
|
||||
*/
|
||||
ColorTransform color_transform_;
|
||||
|
||||
bool is_backend_neutral_ = false;
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief Sets all color settings to the defaults pertaining to this configuration
|
||||
|
||||
Reference in New Issue
Block a user