完成Vulkan渲染后端

This commit is contained in:
2026-07-13 10:19:30 +08:00
parent cd5efa8ea4
commit 3c9592da45
8 changed files with 736 additions and 234 deletions
+5
View File
@@ -987,6 +987,11 @@ bool OpenGLRenderer::EnsureContextCurrent(const char *caller)
return false;
}
if (context_->thread() != QThread::currentThread()) {
qWarning() << caller << "called from the wrong thread for this OpenGL context";
return false;
}
if (QOpenGLContext::currentContext() != context_) {
if (context_->parent() == this && surface_.isValid()) {
if (!context_->makeCurrent(&surface_)) {