mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 10:47:53 +02:00
Vulkan window now works on X11
This commit is contained in:
parent
2c9f83519c
commit
d1a4c8e6ed
3 changed files with 5 additions and 3 deletions
|
@ -276,4 +276,4 @@ surface = context.instance.createAndroidSurfaceKHR(surfaceCreateInfo);
|
|||
#else
|
||||
surface = glfw::createWindowSurface(context.instance, window);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
PlayerWindow::PlayerWindow() {
|
||||
installEventFilter(this);
|
||||
setFlags(Qt::MSWindowsOwnDC | Qt::Window | Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowTitleHint);
|
||||
//setFlags(Qt::MSWindowsOwnDC | Qt::Window | Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowTitleHint);
|
||||
setFlags(Qt::Window);
|
||||
|
||||
#ifdef USE_GL
|
||||
setSurfaceType(QSurface::OpenGLSurface);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <QtCore/QThreadPool>
|
||||
#include <QtX11Extras/QX11Info>
|
||||
#include <gl/OffscreenGLCanvas.h>
|
||||
//#include <QVulkanInstance>
|
||||
#ifdef USE_GL
|
||||
#include <gl/QOpenGLContextWrapper.h>
|
||||
#endif
|
||||
|
@ -89,7 +90,7 @@ void RenderThread::initialize(QWindow* window) {
|
|||
vk::XcbSurfaceCreateInfoKHR surfaceCreateInfo;
|
||||
//dynamic_cast<QGuiApplication*>(QGuiApplication::instance())->platformNativeInterface()->connection();
|
||||
surfaceCreateInfo.connection = QX11Info::connection();
|
||||
surfaceCreateInfo.window = QX11Info::appRootWindow();
|
||||
surfaceCreateInfo.window = (xcb_window_t)(window->winId());
|
||||
_surface = _vkcontext.instance.createXcbSurfaceKHR(surfaceCreateInfo);
|
||||
#endif
|
||||
_vkcontext.createDevice(_surface);
|
||||
|
|
Loading…
Reference in a new issue