Code Monkey home page Code Monkey logo

kimberlite's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.