Showing posts with label Graphics. Show all posts
Showing posts with label Graphics. Show all posts

Wednesday, March 2, 2016

Learning Vulkan for Fun XOR Profit: Part 2, Getting a Spinning Cube to Run

Let's work on getting your environment set up.  I'm using an Intel Broadwell GPU and Fedora 23.
  1. Build your Vulkan driver:
        a. Get your Vulkan driver:

git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa

git checkout -b vulkan origin/vulkan

        b. Install your dependencies:

sudo dnf install libxshmfence-devel 

        c. Configure it

./autogen.sh

        d. Build it

make -j4 

     2. Get a linker.  Vulkan, like OpenCL, requires a system to go out and find the correct Vulkan install:

sudo dnf copr enable ajax/vulkan
sudo dnf install vulkan-devel


     3. Get your spinning cube program.  I'm using Kristian Hogsberg's vkcube:

cd
git clone https://github.com/krh/vkcube.git
cd vkcube

./autogen.sh
make -j4

    4.  Tell your spinning cube where Vulkan is:

export VK_ICD_FILENAMES=/home/[username]/mesa/src/intel/vulkan/dev_icd.json

    5. Run it!!

./vkcube

You should see something like this, a multicolored spinning cube:


Tuesday, February 16, 2016

Announcing a New Series: Learning Vulkan for Fun Xor Profit


Today was the big unveiling of the new Khronos graphics API Vulkan, the successor to OpenGL. I've decided to do a tutorial series on learning the new API for your reference (and my enjoyment).

I'm going to exclusively use the new Intel open source driver, Anvil, which is part of the Mesa project.  To use Anvil, you need to have an Intel integrated graphics card of generation IvyBridge or later.

To start, git clone git://anongit.freedesktop.org/mesa/mesa and checkout and build the Vulkan branch.