Home

Awesome

pasvulkan

Vulkan header generator and Vulkan OOP-style API wrapper for Object Pascal (FreePascal >= 3.3.1 FPC trunk and any recent current Delphi version)

The Vulkan.pas binding header unit itself (including the vkxml2pas.dpr converter) is and stays also compatible with the old Delphi 7 version, but the PasVulkan.*.pas framework units are no more Delphi 7 compatible, because they are using new Object Pascal syntax features, as such as generics, operator overloading, advanced records and so on, which for these the old Delphi 7 compiler version have no support for.

Support me

Support me at Patreon

About me / My contact details

Important repository checkout information

If you've problems with the git clone command, because the repository is too large for you or you don't need the full history of the repository, you can try to use the following command instead:

git clone --single-branch --depth 1 --recursive https://github.com/BeRo1985/pasvulkan.git pasvulkan

or respectively for the SSH variant:

git clone --single-branch --depth 1 --recursive git@github.com:BeRo1985/pasvulkan.git pasvulkan

or alternatively, you can try to turn off the compression, which can also help in some cases, but aware, it is a global setting for all git repositories on your system:

git config --global core.compression 0

Important information

You must first compile the (yet incomplete) PasVulkan project manager using compileprojectmanager (*nix) or compileprojectmanager.bat (Windows) so that you can then use the PasVulkan project manager as a command line tool named projectmanager(.exe) .

And you do need either the most current Delphi version or the most current SVN trunk version of the FreePascal compiler (and not just the stable version of the FreePascal compiler), including correct paths in your PATH environment variable to these compiler binaries. And if you also want to use the Android target, the same applies to Android Studio, the Java SDK, the Android SDK and the Android NDK, that these must be installed at their default locations (as Google prescribes or specifies these default locations, without exceptions) and must be correctly exist in the system environment variables.

And for the Android target you do need all FreePascal cross compiler installations for all from Android official supported CPU targets without any exception, and these are: x86_32/i386, x86_64/AMD64, ARM32 and AArch64/ARM64

How to build and to run the example project

After you've compiled the projectmanager binary, you need to do the following:

StepWindows*nixDescription
1.projectmanager compileassets examples./projectmanager compileassets examplesIt compiles the asset files
2.projectmanager build examples./projectmanager build examplesIt compiles the example code itself
3.projectmanager run examples./projectmanager run examplesIt starts the example binary

Video example

How to create a new project

After you've compiled the projectmanager binary, you need to do the following:

StepWindows*nixDescription
1.projectmanager create [yourprojectname]./projectmanager create [yourprojectname]It creates the new project

Important: Where the project name must be a valid lowercase pascal and java identifier and even a valid file name at the same time!

Video example

For further information regarding the project manager

After you've compiled the projectmanager binary, just execute projectmanager -h in your shell or console for a detailed help output.

Features

License (zlib)

Copyright (C) 2016-2017, Benjamin Rosseaux (benjamin@rosseaux.de)          
                                                                         
This software is provided 'as-is', without any express or implied          
warranty. In no event will the authors be held liable for any damages      
arising from the use of this software.                                     
                                                                         
Permission is granted to anyone to use this software for any purpose,     
including commercial applications, and to alter it and redistribute it    
freely, subject to the following restrictions:                            

1. The origin of this software must not be misrepresented; you must not    
   claim that you wrote the original software. If you use this software    
   in a product, an acknowledgement in the product documentation would be  
   appreciated but is not required.                                        
2. Altered source versions must be plainly marked as such, and must not be 
   misrepresented as being the original software.                          
3. This notice may not be removed or altered from any source distribution. 
 

General guidelines for code contributors

  1. Make sure you are legally allowed to make a contribution under the zlib license.
  2. The zlib license header goes at the top of each source file, with appropriate copyright notice.
  3. This PasVulkan wrapper may be used only with the PasVulkan-own Vulkan Pascal header.
  4. After a pull request, check the status of your pull request on https://github.com/BeRo1985/pasvulkan
  5. Write code which's compatible with Delphi >= 2009 and FreePascal >= 3.1.1
  6. Don't use Delphi-only, FreePascal-only or Lazarus-only libraries/units, but if needed, make it out-ifdef-able.
  7. No use of third-party libraries/units as possible, but if needed, make it out-ifdef-able.
  8. Try to use const when possible.
  9. Make sure to comment out writeln, used while debugging.
  10. Make sure the code compiles on 32-bit and 64-bit platforms (x86-32, x86-64, ARM, ARM64, etc.).
  11. Make sure the code runs on all platforms with Vulkan support

Showcase videos