Vulkan-Samples
Vulkan-Samples copied to clipboard
Sample request: Cross Platform startup project creation script/bat
Is there documentation or a sample showing how to create a cross platform project? I saw there are batch files/scripts to add samples to this project, but I have not seen anywhere showing how to create a new standalone Vulkan project that works across all platforms.
Since Vulkan 1.0 I have been taking one of SaschaWillems simple samples, removing most of the code, then building off of that.
I, and I assume others too, would benefit from a good startup project. Specifically interested in the best way to create it, so I can create standalone projects myself in the future. (CMake, Gradle, etc.)
The following site covers 3/4 platforms in isolation, missing Android. If there is a site that already shows what I am asking for that is okay too, I just haven't found it. https://vulkan-tutorial.com/Development_environment
Last time we tested, the new sample generation scripts as you mentioned this one should generate a sample that works on all platforms we support. Did you have issues with that? Or did I misunderstand your request?
From what I understand that script creates a new sample within the larger set of samples.
Can it be used to create a stand alone project if run in an empty folder? I did not try that.
Standalone project? What do you mean by that?
The sample generated is part of the bigger samples project yes. It will be like any other sample. You can build it in isolation though and run/debug it with or without the meta project.
There are some instructions around that in the build instructions using VKB_ENTRYPOINTS
cmake option.
Standalone as in a new project using Vulkan that has no connection to any other Vulkan project or sample code (edit: it would have connections to code sets that are dependencies to get a working Vulkan based render though, such as the third_party folder). Tomorrow I will have more time to look at how the scripts and batch files work, maybe I can make what I am looking for.
That’s not possible with these scripts. The scripts just creates a Skelton sample for you that you can fill in. It still uses the vulkan samples framework as well as build system to build/run the sample.
After reading your edit. That might work for you. If you want a skeleton project you will get something from other project in it, like the build system etc otherwise you might as well start from scratch.
Okay thank you for the input.
Being able to start from scratch was the main goal. Currently I do not know how to do that with Vulkan so that it will run on windows and android (android is the barrier for me). I was crossing my fingers that there was a sample/tutorial to save time. I am sure I could figure it out, I just need to find time.
Hi @Eths33, This might not be of any use at this point looking at the date but take a look at the android native development kit stable api documentation.
We also use the android native app glue header to help with interoperability between android and C++.
This and a bit of CMake should do the trick
Hi @TomAtkinsonArm thank you for the suggestion. I have been going back and forth with this so it is still appreciated.
In my initial post I said I was using a sample from SaschaWillems, that was a mistake, I had forgot parts of my project since I took a half a year or so break. I have been using code from https://github.com/renelindsay/Vulkan-WSIWindow as a base. Some updates were needed but it is working well.
Recently I found this on ARM's site. Still in the process of reading it, but it has been the most in-depth android focused tutorial. https://arm-software.github.io/vulkan-sdk/tutorials.html
Better documentation on how we support multiple platforms in the framework can be added. Adjusting the tickets name to reflect this
We will add Android, and probably also iOS support to the Vulkan Tutorial at some point in the future. That's a better place than this sample repo.