kimberlite

Vulkan bindings for crystal

kimberlite Build StatusDependency Status

Version 0.1.0

Vulkan bindings for crystal.

Installation

Add this to your application's shard.yml:

dependencies:
  kimberlite:
    github: ragmaanir/kimberlite

Usage

require "kimberlite"

Internals

  • libvulkan.cr: lib generated by crystal_lib from the vulkan header
  • wrappers.cr: Simplest wrappers around the lib. Mostly abstracting away c-specific annoyances.
  • shortcuts.cr: Higher level convenience methods that can be used to get some standard behavior so one does not have to deal with every detail in the vulkan initialization
  • extension.cr: Provides access to some of the vulkan extension methods (e.g. vkCreateDebugUtilsMessengerEXT)
  • lib_extensions.cr: Extends the library structs with convenience methods
  • PipelineBuilder: Can be used to set up a pipeline and provides default values for the objects used to build the pipeline
  • RenderPassBuilder: Same as PipelineBuilder, but for render passes

Development

  • Keep some vulkan.h namings instead of converting to crystal convention so copy&paste is simpler (?)

  • Remove prefixes from enum values (e.g PresentModeKhr in VkPresentModeImmediateKhr)

  • bin/build: generates the README.md from README.md.template.

  • bin/release: release a new version (runs specs, builds README.md, commits, tags, pushes).

  • bin/generate_lib: generates libvulkan.cr:

A docker container is used to generate libvulkan.cr from the vulkan.h of the Vulkan SDK (used version is specified in VULKAN_VERSION file) using crystal_lib. postprocess_libvulkan.cr is used to fix some incorrect renamings done by crystal_lib. crystal_lib is used as a submodule in ./crystal_lib because there might be changes to it that are vulkan specific.

Contributing

  1. Fork it (https://github.com/ragmaanir/kimberlite/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

kimberlite

Owner
Statistic
  • 2
  • 0
  • 0
  • 0
  • 2
  • over 5 years ago
  • September 13, 2018
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 19:56:32 GMT

Languages