diff --git a/dub.json b/dub.json index d533de7..868a74e 100644 --- a/dub.json +++ b/dub.json @@ -11,7 +11,7 @@ "sourceFiles-windows": [], "importPaths": ["src/editor", "src/dlib", "src/dlib/external/xxhash", "src/VulkanRenderer"], "sourcePaths": ["src/editor", "src/dlib", "src/dlib/external/xxhash", "src/VulkanRenderer"], - "libs-linux": ["xcb", "X11", "X11-xcb", "vulkan", "stdc++", "xcb-xfixes", "freetype"], + "libs-linux": ["X11", "vulkan", "stdc++", "xfixes", "freetype"], "libs-windows": [], "versions": ["VULKAN_DEBUG"], "preGenerateCommands-linux": ["./build.sh"], diff --git a/src/VulkanRenderer b/src/VulkanRenderer index c42238a..6bd4718 160000 --- a/src/VulkanRenderer +++ b/src/VulkanRenderer @@ -1 +1 @@ -Subproject commit c42238a456f5048c7d1b2d5ebd71ecf13bb10ece +Subproject commit 6bd47180639496b491fba904d382f3f9c47cd627 diff --git a/src/dlib b/src/dlib index 10b5c0a..a9607ec 160000 --- a/src/dlib +++ b/src/dlib @@ -1 +1 @@ -Subproject commit 10b5c0a127ef5fd5a18b956d2d112cae75017150 +Subproject commit a9607ec0cdd179f45165ffe56393578c85379615 diff --git a/src/editor/main.d b/src/editor/main.d index 4e70bad..5f76ef8 100644 --- a/src/editor/main.d +++ b/src/editor/main.d @@ -18,7 +18,13 @@ void main(string[] argv) f.close(); } - PlatformWindow window = CreateWindow("Editor", 1920, 1080); + PlatformWindow window; + if(!CreateWindow(&window, "Editor", 1920, 1080)) + { + Errf("Unable to create window: %s", WindowError()); + return; + } + StartPlatformThread(&window); EditorCtx ctx = InitEditorCtx(&window); diff --git a/src/editor/ui.d b/src/editor/ui.d index bcae712..b157f90 100644 --- a/src/editor/ui.d +++ b/src/editor/ui.d @@ -728,8 +728,8 @@ InitUICtx(PlatformWindow* window) version(linux) { PlatformHandles handles = { - window: window.window, - conn: window.conn, + display: window.display, + window: window.window, }; } @@ -814,10 +814,9 @@ InitUICtx(PlatformWindow* window) CreateGraphicsPipeline(&ctx.rd, &ctx.pipeline, &ui_info); - CreateImageView(&ctx.rd, &ctx.font_atlas, ctx.atlas_buf.atlas.width, ctx.atlas_buf.atlas.height, 4, ctx.atlas_buf.data); + CreateImageView(&ctx.rd, &ctx.font_atlas, ctx.atlas_buf.atlas.width, ctx.atlas_buf.atlas.height, 4, ctx.atlas_buf.data, DT.Image, 0); - ctx.sampler = CreateSampler(&ctx.rd, MipmapMode.Nearest); - ctx.sampler.binding = 1; + ctx.sampler = CreateSampler(&ctx.rd, MipmapMode.Nearest, 1); Write(&ctx.rd, ctx.desc_set, [ctx.font_atlas, ctx.sampler]);