mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2025-07-04 12:08:48 +02:00
Vulkan backend (#2)
This commit adds the Vulkan backend and SDL2 integration, and provides the `vulkan` example project.
This commit is contained in:
@ -11,6 +11,14 @@ flag opengl
|
||||
manual:
|
||||
False
|
||||
|
||||
flag vulkan
|
||||
description:
|
||||
Enable Vulkan backend.
|
||||
default:
|
||||
False
|
||||
manual:
|
||||
True
|
||||
|
||||
flag sdl
|
||||
description:
|
||||
Enable SDL backend.
|
||||
@ -64,6 +72,27 @@ library
|
||||
extra-libraries:
|
||||
GL
|
||||
|
||||
if flag(vulkan)
|
||||
exposed-modules:
|
||||
DearImGui.Vulkan
|
||||
other-modules:
|
||||
DearImGui.Vulkan.Types
|
||||
build-depends:
|
||||
vulkan
|
||||
, unliftio
|
||||
cxx-sources:
|
||||
imgui/backends/imgui_impl_vulkan.cpp
|
||||
if os(windows)
|
||||
extra-libraries:
|
||||
vulkan-1
|
||||
else
|
||||
if os(darwin)
|
||||
extra-libraries:
|
||||
vulkan
|
||||
else
|
||||
pkgconfig-depends:
|
||||
vulkan
|
||||
|
||||
if flag(sdl)
|
||||
exposed-modules:
|
||||
DearImGui.SDL
|
||||
@ -83,6 +112,10 @@ library
|
||||
exposed-modules:
|
||||
DearImGui.SDL.OpenGL
|
||||
|
||||
if flag(vulkan)
|
||||
exposed-modules:
|
||||
DearImGui.SDL.Vulkan
|
||||
|
||||
|
||||
executable test
|
||||
main-is: Main.hs
|
||||
@ -97,3 +130,38 @@ executable readme
|
||||
default-language: Haskell2010
|
||||
build-depends: base, sdl2, gl, dear-imgui, managed
|
||||
ghc-options: -Wall
|
||||
|
||||
executable vulkan
|
||||
main-is: Main.hs
|
||||
other-modules: Attachments, Backend, Input, Util
|
||||
hs-source-dirs: examples/vulkan
|
||||
default-language: Haskell2010
|
||||
build-depends:
|
||||
dear-imgui
|
||||
, base
|
||||
>= 4.13 && < 4.16
|
||||
, bytestring
|
||||
>= 0.10.10.0 && < 0.12
|
||||
, containers
|
||||
^>= 0.6.2.1
|
||||
, logging-effect
|
||||
^>= 1.3.12
|
||||
, resourcet
|
||||
^>= 1.2.4.2
|
||||
, sdl2
|
||||
^>= 2.5.3.0
|
||||
, text-short
|
||||
^>= 0.1.3
|
||||
, transformers
|
||||
^>= 0.5.6.2
|
||||
, unliftio
|
||||
>= 0.2.13 && < 0.2.15
|
||||
, unliftio-core
|
||||
^>= 0.2.0.1
|
||||
, vector
|
||||
^>= 0.12.1.2
|
||||
, vulkan
|
||||
^>= 3.9
|
||||
, vulkan-utils
|
||||
^>= 0.4.1
|
||||
ghc-options: -Wall
|
||||
|
Reference in New Issue
Block a user