mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Tidy up handling of windowing data, make it a bit more type safe
This commit is contained in:
@@ -64,7 +64,7 @@ void DisplayRendererPreview(IReplayController *renderer, TextureDisplay &display
|
||||
|
||||
pthread_mutex_lock(&m_DrawLock.lock);
|
||||
|
||||
IReplayOutput *out = renderer->CreateOutput(WindowingSystem::Android, connectionScreenWindow,
|
||||
IReplayOutput *out = renderer->CreateOutput(CreateAndroidWindowingData(connectionScreenWindow),
|
||||
ReplayOutputType::Texture);
|
||||
|
||||
out->SetTextureDisplay(displayCfg);
|
||||
|
||||
@@ -282,19 +282,13 @@ void DisplayRendererPreview(IReplayController *renderer, TextureDisplay &display
|
||||
// prefer xcb
|
||||
if(xcb)
|
||||
{
|
||||
XCBWindowData windowData;
|
||||
windowData.connection = connection;
|
||||
windowData.window = window;
|
||||
|
||||
out = renderer->CreateOutput(WindowingSystem::XCB, &windowData, ReplayOutputType::Texture);
|
||||
out = renderer->CreateOutput(CreateXCBWindowingData(connection, window),
|
||||
ReplayOutputType::Texture);
|
||||
}
|
||||
else if(xlib)
|
||||
{
|
||||
XlibWindowData windowData;
|
||||
windowData.display = display;
|
||||
windowData.window = (Drawable)window; // safe to cast types
|
||||
|
||||
out = renderer->CreateOutput(WindowingSystem::Xlib, &windowData, ReplayOutputType::Texture);
|
||||
out = renderer->CreateOutput(CreateXlibWindowingData(display, (Drawable)window),
|
||||
ReplayOutputType::Texture);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -144,7 +144,8 @@ void DisplayRendererPreview(IReplayController *renderer, TextureDisplay &display
|
||||
ShowWindow(wnd, SW_SHOW);
|
||||
UpdateWindow(wnd);
|
||||
|
||||
IReplayOutput *out = renderer->CreateOutput(WindowingSystem::Win32, wnd, ReplayOutputType::Texture);
|
||||
IReplayOutput *out =
|
||||
renderer->CreateOutput(CreateWin32WindowingData(wnd), ReplayOutputType::Texture);
|
||||
|
||||
out->SetTextureDisplay(displayCfg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user