UI tweaks, use B8G8R8A8_UNORM in wgui

This commit is contained in:
Aleksander
2025-09-21 20:25:57 +02:00
parent 858c5da21c
commit 4afdde1793
10 changed files with 97 additions and 105 deletions

View File

@@ -23,10 +23,7 @@ impl TestbedAny {
let globals = WguiGlobals::new(
Box::new(assets::Asset {}),
wgui::globals::Defaults {
dark_mode: true,
text_color: wgui::drawing::Color::new(1.0, 1.0, 1.0, 1.0),
},
wgui::globals::Defaults::default(),
)?;
let (layout, state) = wgui::parser::new_layout_from_assets(

View File

@@ -61,10 +61,7 @@ impl TestbedGeneric {
let globals = WguiGlobals::new(
Box::new(assets::Asset {}),
wgui::globals::Defaults {
text_color: wgui::drawing::Color::new(1.0, 1.0, 1.0, 1.0),
dark_mode: true,
},
wgui::globals::Defaults::default(),
)?;
let extra = ParseDocumentExtra {

View File

@@ -5,7 +5,6 @@ use vulkano::{
physical::{PhysicalDevice, PhysicalDeviceType},
},
instance::{Instance, InstanceCreateInfo},
swapchain::SurfaceInfo,
};
use wgui::gfx::WGfx;
@@ -85,12 +84,6 @@ pub fn init_window() -> anyhow::Result<(
log::info!("img_filter_cubic!");
}
let surface_format = physical_device
.surface_formats(&surface, SurfaceInfo::default())
.unwrap()[0] // want panic
.0;
log::info!("Using surface format: {surface_format:?}");
let (device, queues) = Device::new(
physical_device,
DeviceCreateInfo {
@@ -113,7 +106,13 @@ pub fn init_window() -> anyhow::Result<(
let (queue_gfx, queue_xfer, _) = unwrap_queues(queues.collect());
let me = WGfx::new_from_raw(instance, device, queue_gfx, queue_xfer, surface_format);
let me = WGfx::new_from_raw(
instance,
device,
queue_gfx,
queue_xfer,
vulkano::format::Format::B8G8R8A8_UNORM,
);
Ok((me, event_loop, window, surface))
}