Giter Site home page Giter Site logo

doug-clayton / vulkantutoriald Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 19.69 MB

A Triangle Example with D Language (dlang) and Vulkan 1.1.106.0

Home Page: https://dougclayton.weebly.com/

Batchfile 0.02% GLSL 0.09% D 99.89%
d dlang2 vulkan binding glfw3 dlang

vulkantutoriald's Introduction

Triangle Example with D Language (dlang) and Vulkan 1.1.106.0

May 17th 2019

This example app shows how you can use Vulkan with the D language to create your own applications! All of the code has been adapted from the wonderful tutorial at: https://vulkan-tutorial.com

The code in this example stops at https://vulkan-tutorial.com/Drawing_a_triangle/Swap_chain_recreation because I didn't want to force anyone to reuse my math libraries or any of my other custom code to get this running.

Example Image

Notes

  • This has only been tested on Windows 10, as this is the only OS I run.
  • You may need to make some changes in order to get everything working on other platforms.
    • The static libraries in "libs" and the dynamic libraries in "bin" will definitely need to be swapped out for the platform specific versions.

Requirements

  • DMD 2.086.0 or higher
  • DUB 1.11.0 or higher
  • Vulkan 1.1.106.0 or higher compatible drivers and a compatible video card
  • Vulkan SDK 1.1.106.0 https://vulkan.lunarg.com

Third Party Bindings created for this project (using DStep + manual changes):

Instructions for use

  • Make sure that the GLFW.dll and all of the VK layer files are located in the output directory! (Currently "bin/")

  • Make sure that the libglfw3dll.a and vulkan-1.lib files are located in the "libs" directory.

  • Update the two strings in resources\shaders\compile.bat to point to glslangValidator.exe on your machine. (E.g., "C:\VulkanSDK\VersionNumber\Bin\glslangValidator.exe") This will allow you to convert GLSL shaders to SPIRV.

  • To build the project from command line, at the top level folder, use this command: "dub build --build=debug"

  • To debug in Visual Studio Code, please toggle the "Allow Breakpoints Everywhere" setting on and install either the "Dlang" or D "Programming Language (code-d)" extension to support debugging with the cppvsdbg.

    • The app already has a launch.json and tasks.json set up to debug.
  • Run app.exe in the bin folder and you should hopefully see a window with a triangle in it.

  • Happy coding!

vulkantutoriald's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.