fix Windows and macOS symbol error

This commit is contained in:
2026-07-13 10:19:30 +08:00
parent 83424e3c79
commit 30e7153154
2 changed files with 18 additions and 11 deletions
+3 -2
View File
@@ -108,8 +108,8 @@ if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
common/filefunctions.h
common/qtutils.cpp
common/qtutils.h
config/config.cpp
config/config.h
common/xmlutils.cpp
common/xmlutils.h
node/param.cpp
node/param.h
node/splitvalue.h
@@ -148,6 +148,7 @@ if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
render/opengl/openglrenderer.h
)
target_link_libraries(oakgl PRIVATE libolive-rendercore)
target_compile_definitions(oakgl PRIVATE OAK_RENDER_BACKEND_PLUGIN)
set_target_properties(oakgl PROPERTIES
OUTPUT_NAME oakgl
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+11 -5
View File
@@ -28,7 +28,9 @@
#include <QRegularExpression>
#include "common/filefunctions.h"
#if !defined(OAK_RENDER_BACKEND_PLUGIN)
#include "config/config.h"
#endif
#include "render/job/shaderjob.h"
namespace olive
@@ -394,19 +396,23 @@ void OpenGLRenderer::Flush()
{
GL_PREAMBLE;
#if !defined(OAK_RENDER_BACKEND_PLUGIN)
if (OLIVE_CONFIG("UseGLFinish").toBool()) {
functions_->glFinish();
} else {
return;
}
#endif
#if defined(Q_OS_MAC)
// macOS uses Tile-Based Deferred Rendering (TBDR). glFlush() does not
// guarantee that tile memory has been written back to texture memory.
// Using glFinish() prevents partial tile corruption ("black ink" artifacts).
// The dynamically loaded OpenGL backend cannot depend on the editor Config
// singleton because that pulls UI/Core symbols into the plugin. This
// platform default also preserves the previous macOS-safe behavior for
// texture consumers on TBDR drivers.
functions_->glFinish();
#else
functions_->glFlush();
#endif
}
}
// Adapts the generic Renderer output attachment hook to OpenGL's framebuffer
// attachment path used by OFX OpenGL rendering.