How to build for Kha with Vulcan target?

Hello! I tried to follow the guide and get haxe compile error with html5 target. I googled a lot, but not found how to choice Vulcan. Many of chapters Kha documentation is not wrote. I saw examples, but not for Vulcan and I don’t understand how to change them for it. Maybe anyone have an example config? I could use any help.

Hi Leto,

So im not actually sure myself, presumably there is some flag or option in kha itself? haxeui-kha just uses kha for rendering, so however that is setup is what it will use… the kha folks (discord / forums) will almost certainly have more information than i do.

Can you expand on this? What do you mean? Do you mean haxeui-html5? Or haxeui-kha using js build? What errors?

Cheers,
Ian

Searching by sources not give result too. OpenGL is found, Vulcan - not. Ok, I will ask in some of the kha networks. Thank you.

Make step:

[alex@hard testui]$ haxelib run haxeui-core create kha
 
 Creating haxeui-kha files for "Main"
        - Creating directory "/home/alex/code/haxe/testui/src"
        - Creating directory "/home/alex/code/haxe/testui/assets"
        - Copying "/home/alex/code/haxe/lib/haxeui-core/1,6,0/cli/templates/shared/Main.hx" to "/home/alex/code/haxe/testui/src/Main.hx"
        - Copying "/home/alex/code/haxe/lib/haxeui-core/1,6,0/cli/templates/shared/MainView.hx" to "/home/alex/code/haxe/testui/src/MainView.hx"
        - Copying "/home/alex/code/haxe/lib/haxeui-core/1,6,0/cli/templates/shared/assets/main-view.xml" to "/home/alex/code/haxe/testui/assets/main-view.xml"
        - Copying "/home/alex/code/haxe/lib/haxeui-core/1,6,0/cli/templates/kha-shared/khafile.js" to "/home/alex/code/haxe/testui/khafile.js"
 running: node Kha/make html5 --to temp/kha
 Using Kha (ffcf3c47) from /home/alex/code/haxe/testui/Kha
 Creating Kha project.
 Compiling shader 1 of 8 (painter-colored.frag.glsl).
 Compiling shader 2 of 8 (painter-colored.vert.glsl).
 Compiling shader 3 of 8 (painter-image.frag.glsl).
 Compiling shader 4 of 8 (painter-image.vert.glsl).
 Compiling shader 5 of 8 (painter-text.frag.glsl).
 Compiling shader 6 of 8 (painter-text.vert.glsl).
 Compiling shader 7 of 8 (painter-video.frag.glsl).
 Compiling shader 8 of 8 (painter-video.vert.glsl).
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/SortDirection.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/AnimationFillMode.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/AnimationDirection.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/UnitTime.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/validation/InvalidationFlags.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/actions/ActionType.hx:7: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/SortDirection.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/actions/ActionManager.hx:14: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/Priority.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/HorizontalAlign.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/ScaleMode.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-core/1,6,0/haxe/ui/constants/VerticalAlign.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
 /home/alex/code/haxe/lib/haxeui-kha/1,6,0/haxe/ui/backend/kha/SDFPainter.hx:846: characters 43-64 : Class<kha.Shaders> has no field painter_sdf_rect_frag
 /home/alex/code/haxe/lib/haxeui-kha/1,6,0/haxe/ui/backend/kha/SDFPainter.hx:847: characters 41-62 : Class<kha.Shaders> has no field painter_sdf_rect_vert
 /home/alex/code/haxe/lib/haxeui-kha/1,6,0/haxe/ui/backend/kha/SDFPainter.hx:869: characters 43-66 : Class<kha.Shaders> has no field painter_sdf_circle_frag
 /home/alex/code/haxe/lib/haxeui-kha/1,6,0/haxe/ui/backend/kha/SDFPainter.hx:870: characters 41-64 : Class<kha.Shaders> has no field painter_sdf_circle_vert
 /home/alex/code/haxe/lib/haxeui-kha/1,6,0/haxe/ui/backend/kha/SDFPainter.hx:891: characters 43-64 : Class<kha.Shaders> has no field painter_sdf_line_frag
 /home/alex/code/haxe/lib/haxeui-kha/1,6,0/haxe/ui/backend/kha/SDFPainter.hx:892: characters 41-62 : Class<kha.Shaders> has no field painter_sdf_line_vert
 
 Haxe compiler error.

It didn’t display a reason, so I didn’t find it right away. I have not been able to reproduce the situation where the reason is not displayed, it seems to only happen when creating a project. Just another try:

[alex@hard testui]$ node Kha/make linux
...
/home/alex/code/haxe/testui/src/MainView.hx:6: characters 1-8 : UI markup file "assets/main-view.xml" not found
/home/alex/code/haxe/testui/src/MainView.hx:6: characters 1-8 : Build failure
/home/alex/code/haxe/testui/src/MainView.hx:6: characters 1-8 : ... For function argument 'component'

Haxe compiler error.

Hmm, strange. assets/main-view.xml is existing, example project building normal with openfl and another backends.

[alex@hard testui]$ tree build
build
β”œβ”€β”€ html5
β”‚   β”œβ”€β”€ favicon.ico
β”‚   └── main-view.xml
β”œβ”€β”€ html5-resources
β”‚   β”œβ”€β”€ files.json
β”‚   β”œβ”€β”€ painter-colored.frag.essl
β”‚   β”œβ”€β”€ painter-colored-relaxed.frag.essl
β”‚   β”œβ”€β”€ painter-colored-relaxed.vert.essl
β”‚   β”œβ”€β”€ painter-colored.vert.essl
β”‚   β”œβ”€β”€ painter-colored-webgl2.frag.essl
β”‚   β”œβ”€β”€ painter-colored-webgl2.vert.essl
β”‚   β”œβ”€β”€ painter-image.frag.essl
β”‚   β”œβ”€β”€ painter-image-relaxed.frag.essl
β”‚   β”œβ”€β”€ painter-image-relaxed.vert.essl
β”‚   β”œβ”€β”€ painter-image.vert.essl
β”‚   β”œβ”€β”€ painter-image-webgl2.frag.essl
β”‚   β”œβ”€β”€ painter-image-webgl2.vert.essl
β”‚   β”œβ”€β”€ painter-text.frag.essl
β”‚   β”œβ”€β”€ painter-text-relaxed.frag.essl
β”‚   β”œβ”€β”€ painter-text-relaxed.vert.essl
β”‚   β”œβ”€β”€ painter-text.vert.essl
β”‚   β”œβ”€β”€ painter-text-webgl2.frag.essl
β”‚   β”œβ”€β”€ painter-text-webgl2.vert.essl
β”‚   β”œβ”€β”€ painter-video.frag.essl
β”‚   β”œβ”€β”€ painter-video-relaxed.frag.essl
β”‚   β”œβ”€β”€ painter-video-relaxed.vert.essl
β”‚   β”œβ”€β”€ painter-video.vert.essl
β”‚   β”œβ”€β”€ painter-video-webgl2.frag.essl
β”‚   └── painter-video-webgl2.vert.essl
β”œβ”€β”€ linux
β”‚   └── main-view.xml
β”œβ”€β”€ linux-resources
β”‚   β”œβ”€β”€ files.json
β”‚   β”œβ”€β”€ painter-colored.frag.spirv
β”‚   β”œβ”€β”€ painter-colored.vert.spirv
β”‚   β”œβ”€β”€ painter-image.frag.spirv
β”‚   β”œβ”€β”€ painter-image.vert.spirv
β”‚   β”œβ”€β”€ painter-text.frag.spirv
β”‚   β”œβ”€β”€ painter-text.vert.spirv
β”‚   β”œβ”€β”€ painter-video.frag.spirv
β”‚   └── painter-video.vert.spirv
β”œβ”€β”€ Main-html5.hxproj
β”œβ”€β”€ Main-html5-intellij
β”‚   └── Main.iml
β”œβ”€β”€ Main-linux.hxproj
β”œβ”€β”€ Main-linux-intellij
β”‚   └── Main.iml
β”œβ”€β”€ project-html5.hxml
β”œβ”€β”€ project-linux.hxml
└── temp
    └── cache.json

are you using git versions of haxeui-core / haxeui-kha? You certainly want to be… Im hoping to make a 1.7 release this weekend

crossed_fingers

1 Like

No. How newer is the git version?

Like almost a year newer, that said, im hopeing to release 1.7 today