Code Monkey home page Code Monkey logo

vulkansamples's Introduction

Vulkan Samples Kit

  • This repository is a collection of Vulkan C++ sample applications.
  • Run the following script to obtain a short description of all or a specific sample: $ src/get-short-descripts.sh
  • Run the following script to obtain a more detailed description of all samples with a long description set: $ src/get-descripts.sh

Requirements/Dependencies

  • A recent version of the LunarG Vulkan SDK must be installed on the system. In addtion to the Vulkan headers and libraries, the SDK also includes the glslang and spirv-tools components necessary to build the sample progams.
  • Linux package dependencies:
    • Vulkan SDK required packages
    • cmake
  • Windows dependencies include:
    • Vulkan SDK required components
    • cmake
  • Note that if you have a LoaderAndValidationLayers repository, and/or a glslang repository that are file system peers to VulkanSamplesKit, cmake will look in those repositories for headers and libraries before looking in SDK or system locations. Build directories in those repositories should be named "build".

Kit Structure

  • The Vulkan Samples Kit is a set of source and data files in a specific directory hierarchy:
    • API-Samples - Samples that demonstrate the use of various aspects of the Vulkan API
    • Demos - Samples that are more functional and go deeper than simple API use.
    • Layer-Samples - Samples that are implemented as layers.
    • Android-Only - Samples that are only meant to be run on Android

Sample progression

  • In general, the samples are not interrelated, but there is a progression among some of the samples that lead to drawing a cube. Start with the instance sample, then device, initcommandbuffer, initswapchain, initdepthbuffer, inituniformbuffer, descriptor_pipeline_layouts, initrenderpass, initshaders, initframebuffers, vertexbuffer, allocdescriptorsets, initpipeline, and they culminate in the drawcube sample. Each sample uses utility routines from the code from previous samples to get to the point to show something new. The drawtexturedcube sample takes all of the drawcube code and adds texturing.

Building the Vulkan Samples Kit

Linux:

$ cmake -H. -Bbuild
$ make -C build 

Windows:

64-bit Windows

From a PowerShell window, first build glslang:

PS > cd C:\VulkanSDK\<version>\glslang
PS > mkdir build
PS > cd build
PS > cmake -G "Visual Studio 12 Win64" ..

Open the glslang.sln file in the build folder with Microsoft Visual Studio and build the solution in both Debug and Release mode.

Next build spirv-tools:

PS > cd C:\VulkanSDK\<version>\spirv-tools
PS > mkdir build
PS > cd build
PS > cmake -G "Visual Studio 12 Win64" ..

Open the spirv-tools.sln file in the build folder with Microsoft Visual Studio and build the solution in both Debug and Release mode.

Next build the Vulkan Samples:

PS > cd C:\VulkanSDK\<version>\Samples
PS > mkdir build
PS > cd build
PS > cmake -G "Visual Studio 12 Win64" ..

Open the VULKAN_SAMPLES.sln file in the build folder with Microsoft Visual Studio and build the solution.

32-bit Windows

Perform the same operations as 64-bit Windows above, except with the following adjustments:

PS > mkdir build32
PS > cd build32
PS > cmake -G "Visual Studio 12" ..

Contributing

Refer to the README.contrib file for specific info regarding contributing to the Vulkan samples creation effort.

vulkansamples's People

Contributors

tonybarbour avatar olvaffe avatar cnorthrop avatar lisa-lunarg avatar courtney-lunarg avatar davidlunarg avatar marky-lunarg avatar jeremy-lunarg avatar baldurk avatar hak avatar karl-lunarg avatar ggfan avatar chrisforbes avatar jon-lunarg avatar mark-lunarg avatar stroyan avatar dneto0 avatar ianelliottus avatar

Watchers

SlimTracy 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.