mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Pass screen index (so you can guess 0), fix Qt to display
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <QX11Info>
|
||||
#include <X11/Xlib.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
|
||||
@@ -117,11 +117,11 @@ void TextureViewer::OnLogfileLoaded()
|
||||
#if defined(WIN32)
|
||||
HWND wnd = (HWND)ui->render->winId();
|
||||
#elif defined(__linux__)
|
||||
Display *display = QX11Info::display();
|
||||
GLXDrawable drawable = (GLXDrawable)ui->render->winId();
|
||||
xcb_connection_t *display = QX11Info::connection();
|
||||
xcb_window_t window = (xcb_window_t)ui->render->winId();
|
||||
|
||||
void *displayAndDrawable[2] = { (void *)display, (void *)drawable };
|
||||
void *wnd = displayAndDrawable;
|
||||
void *connectionScreenWindow[3] = { (void *)display, (void *)0, (void *)(uintptr_t)window };
|
||||
void *wnd = connectionScreenWindow;
|
||||
#else
|
||||
#error "Unknown platform"
|
||||
#endif
|
||||
|
||||
@@ -26,11 +26,17 @@
|
||||
|
||||
void VulkanReplay::OutputWindow::SetWindowHandle(void *wn)
|
||||
{
|
||||
void **displayAndDrawable = (void **)wn;
|
||||
void **connectionScreenWindow = (void **)wn;
|
||||
|
||||
connection = (xcb_connection_t *)displayAndDrawable[0];
|
||||
screen = (xcb_screen_t *)displayAndDrawable[1];
|
||||
wnd = (xcb_window_t)(size_t)displayAndDrawable[2];
|
||||
connection = (xcb_connection_t *)connectionScreenWindow[0];
|
||||
int scr = (int)(uintptr_t)connectionScreenWindow[1];
|
||||
wnd = (xcb_window_t)(uintptr_t)connectionScreenWindow[2];
|
||||
|
||||
const xcb_setup_t *setup = xcb_get_setup(connection);
|
||||
xcb_screen_iterator_t iter = xcb_setup_roots_iterator(setup);
|
||||
while (scr-- > 0) xcb_screen_next(&iter);
|
||||
|
||||
screen = iter.data;
|
||||
}
|
||||
|
||||
void VulkanReplay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
|
||||
|
||||
@@ -97,9 +97,9 @@ void DisplayRendererPreview(ReplayRenderer *renderer, TextureDisplay displayCfg)
|
||||
|
||||
xcb_map_window(connection, window);
|
||||
|
||||
void *displayAndDrawable[] = { (void *)connection, (void *)screen, (void *)(size_t)window };
|
||||
void *connectionScreenWindow[] = { (void *)connection, (void *)(uintptr_t)scr, (void *)(uintptr_t)window };
|
||||
|
||||
ReplayOutput *out = ReplayRenderer_CreateOutput(renderer, displayAndDrawable);
|
||||
ReplayOutput *out = ReplayRenderer_CreateOutput(renderer, connectionScreenWindow);
|
||||
|
||||
OutputConfig c = { eOutputType_TexDisplay };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user