Skip to content

Commit a9702c5

Browse files
committed
Readme upd
1 parent c28de5b commit a9702c5

File tree

2 files changed

+62
-36
lines changed

2 files changed

+62
-36
lines changed

LICENSE renamed to LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright © 2016 Maxim Kupriianov <[email protected]>
2+
Copyright © 2016-2017 Maxim Kupriianov <[email protected]>
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the “Software”), to deal

README.md

Lines changed: 61 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,79 @@
44

55
Package [vulkan](https://github.com/vulkan-go/vulkan) provides Go bindings for [Vulkan](https://www.khronos.org/vulkan/) — a low-overhead, cross-platform 3D graphics and compute API.
66

7+
## Introduction
8+
79
Vulkan API is the result of 18 months in an intense collaboration between leading hardware, game engine and platform vendors, built on significant contributions from multiple Khronos members. Vulkan is designed for portability across multiple platforms with desktop and mobile GPU architectures.
810

911
Read the brief: https://developer.nvidia.com/engaging-voyage-vulkan
1012

11-
I'm glad to announce that now it is possible to combine all the power and pragmatism of Golang with
12-
all those benefits that Vulkan introduced. A real chance to have a way to create graphics without touching
13-
any of C/C++, using your favourite language that scales extremely well as the codebase grows.
13+
The binding allows one to use Vulkan API directly within Go code, avoiding
14+
adding lots of C/C++ in the projects, also can be used to study Vulkan without
15+
diving too deep into C/C++ language semantics. For me it's just a matter of
16+
taste, writing Go code is simply more pleasant experience.
1417

15-
## How to use
18+
## Project history timeline
1619

17-
Despite being almost the largest Golang binding ever, the usage of this package is straigforward due to the nature of Vulkan. Just import it like this:
20+
* **2016-02-16** Vulkan API publicly released.
1821

19-
```
20-
import vk "github.com/vulkan-go/vulkan"
21-
```
22+
* **2016-03-06** [vulkan-go](https://github.com/vulkan-go) initial commit and first binding.
23+
24+
* **2016-05-14** Finally received my NVIDIA Shield Tablet K1 (DHL lost the first parcel), I decided to use tablet because it was the first device supporting Vulkan out of the box. And that was a really good implementation, much wow very reference.
25+
26+
* **2016-05-17** Created [android-go](https://github.com/android-go) project in order to run Vulkan on the android platform.
27+
28+
* **2016-05-23** First android-go + vulkan program runs on Tablet K1 ([screenshot](http://dl.xlab.is/vulkan/screens/first-android-vulkaninfo.png)).
29+
30+
* **2016-05-24** Improved VulkanInfo example runs on Tablet K1 ([screenshot](http://dl.xlab.is/vulkan/screens/improved-android-vulkaninfo.png)).
31+
32+
* **2016-05-28** [android-go](https://github.com/android-go) released into public ([Reddit post](https://www.reddit.com/r/golang/comments/4lgttr/full_golang_bindings_for_android_ndk_api_with/)) with plenty of examples including GLES/EGL.
33+
34+
* **2016-08-13** Finished an app that should draw triangle (ported from tri.c from LunarG demos). Draws nothing instead.
35+
36+
* **2016-08-13** First unsuccessful attempt to write a spinning cube example. More than 25 hours spent, 2.5 lines of C code rewritten in 900 lines of Go code. The reference code was found in some very old LunarG demo, it seems I should've been using the latest one.. At least got the validation layers working and found some bugs in the triangle app code.
37+
38+
* **2016-08-16** First Vulkan API program in Go that draws triangle runs on Tablet K1 ([photo](http://dl.xlab.is/vulkan/screens/first-android-vulkandraw.jpg)), validaton layers work perfectly too.
39+
40+
* **2016-08-16** Public announce of this project ([Reddit post](https://www.reddit.com/r/golang/comments/4y2dj4/golang_bindings_for_vulkan_api_with_demos/)). Reaction was "Meh".
41+
42+
* **2016-11-01** [MoltenVK](https://moltengl.com/moltenvk/) driver merged into GLFW (see [GLFW issue #870](https://github.com/glfw/glfw/issues/870)) and this made possible to use Vulkan API under Apple OS X or macOS.
43+
44+
* **2016-11-06** VulkanInfo and VulkanDraw both ported to desktop OS X and use GLFW to initialize Vulkan ([screen #1](http://dl.xlab.is/vulkan/screens/first-moltenvk-vulkaninfo.png) and [screen #2](http://dl.xlab.is/vulkan/screens/first-moltenvk-vulkandraw.png))
45+
46+
* **2016-11-07** VulkanInfo runs fine on NVIDIA GTX980 initialized through GLFW under Windows 10 ([screen #1](http://dl.xlab.is/vulkan/screens/first-windows-vulkaninfo.png) and [screen #2](http://dl.xlab.is/vulkan/screens/first-windows-vulkandraw.png)).
2247

23-
And you're set. However I must warn you that using this thing properly is not an easy task at all!
48+
* **2016-11-08** VulkanInfo runs in headless (a.k.a computing) mode in Amazon AWS cloud on P2 Instance equipped Tesla K80 ([screenshot](http://dl.xlab.is/vulkan/screens/first-amazon-vulkaninfo.png)).
2449

25-
First of all, you'd need a device with the native Vulkan API support. Major platforms like Windows and Linux are
26-
too clumsy so I decided to stick with Android. I have bought an Nvidia Shield K1 tablet for this, because of their early support back into the March of 2016: https://developer.nvidia.com/vulkan-android.
50+
* **2016-11-09** [ios-go](https://github.com/xlab/ios-go) project started, it's very easy to run Golang apps on iOS that use custom surface, for my case it was Metal surface.
2751

28-
Current list of devices includes some of the Android N devices, as specified at [Android NDK help pages](https://developer.android.com/ndk/guides/graphics/getting-started.html) and so far as I know Samsung Galaxy S7 has the native Vulkan drivers, but the one borrowed from a friend lacked the swapchain device extension. I'll try to maintain a list of supported devices here: [0vulkaninfo.md](https://gist.github.com/xlab/4caad9c24735d14d2c4d044d775c699b), so leave a comment if you've succeed with yours.
52+
* **2016-11-11** VulkanInfo runs fine on my iPhone under iOS ([screenshot](http://dl.xlab.is/vulkan/screens/first-ios-vulkaninfo.png)), and so does VulkanDraw ([photo](http://dl.xlab.is/vulkan/screens/first-ios-vulkandraw.jpg) also [GPU report from XCode](http://dl.xlab.is/vulkan/screens/gpureport-ios-vulkandraw.png))
2953

30-
In order to be able create apps for android using the Android NDK without any fancy stuff being done with ANativeWindow,
31-
I dedicated some time in May 2016 to create this framework: http://github.com/xlab/android-go. It works cool with EGL/GLES/GLES2 but of course that was a side-effect! ;) What I really did was the first Vulkan run.
54+
* **2016-11-13** Second unsuccessful attempt to write spinning cube. 25 hours spent. The approach was highly inspired by [Mali Vulkan SDK for Android 1.0](http://malideveloper.arm.com/downloads/deved/tutorial/SDK/Vulkan/1.0/index.html) and I created initial version of [vulkan-go/asche](https://github.com/vulkan-go/asche) — a higher level framework to simplify Vulkan initialization for new apps.
3255

33-
Anyway, since May my binding generator improved a lot due to feedback and bugs I got while binding those two beasts,
34-
so in August I found some time on a weekend to create examples. I had them ported from C of course, it was about 5KLOC, see [Golang Vulkan API Demos](https://github.com/vulkan-go/demos) but they do work, so the Vulkan API for Golang is official (at least for Android, heh).
56+
* **2016-11-29** Generic Linux support added in using GLFW ([Issue #2](https://github.com/vulkan-go/vulkan/issues/2)) thanks @jfreymuth.
3557

36-
I'm hoping for pull-requests from the community so we'd be able to run this on Windows and Linux too, since AFAIK, there is no limitations at all. In fact, I cannot recall if there was any hacks involved while I was doing my experiments. This thing just works in a very idiomatic way, meeting all the common Vulkan guidelines.
58+
* **2016-05-06** Third, successful attempt to write spining cube example. 16 hours spent, 4K LOC of C code rewritten from [cube.c](https://github.com/LunarG/VulkanSamples/blob/master/demos/cube.c) of LunarG demos.
3759

38-
<a href="https://cl.ly/410g1n2r041E/screen.png"><img src="https://cl.ly/410g1n2r041E/screen.png" width="200"></a>
60+
* **2016-05-06** [vulkan-go/asche](https://github.com/vulkan-go/asche) complete.
3961

40-
## Layers
62+
![vulkan cube golang](http://dl.xlab.is/vulkan/screens/cube60.gif)
63+
64+
See all demos in [vulkan-go/demos](https://github.com/vulkan-go/demos).
65+
66+
## How to use
67+
68+
Usage of this project is straigforward due to the stateless nature of Vulkan API.
69+
Just import the package like this:
70+
71+
```
72+
import vk "github.com/vulkan-go/vulkan"
73+
```
74+
75+
And you're set. I must warn you that using the API properly is not an easy task at all, so beware and follow the official documentation: https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html
76+
77+
In order to simplify development, I created a high-level framework that manages Vulkan platform state and initialization. It is called [asche](https://github.com/vulkan-go/asche) because when you throw goper into volcano you get a pile of ash. Currently it's used in [VulkanCube](https://github.com/vulkan-go/demos/blob/master/vulkancube/vulkancube_android/main.go) demo app.
78+
79+
## Validation Layers
4180

4281
A good brief of the current state of Vulkan validation layers: [Explore the Vulkan Loader and Validation Layers](https://lunarg.com/wp-content/uploads/2016/07/lunarg-birds-feather-session-siggraph-july-26-2016.pdf) (PDF).
4382

@@ -66,26 +105,13 @@ After that you'd copy the objects to `android/jni/libs` in your project and acti
66105
[Layer DS][ERROR 22] Unable to allocate 2 descriptors of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER from pool 0x1c. This pool only has 1 descriptors of this type remaining.
67106
```
68107

69-
# What's next?
70-
71-
* More platforms
72-
* Some kind of SDK that will lift up the initialisation burden
73-
* More working demos (after a little SDK)
74-
* More people involved
75-
76-
Anyways, Vulkan has really rich possibilites for management and I think gophers can benefit there. Because in order to fully utilize Vulkan and its API, it's just not enough to call some functions and shovel some variables into some structs. It's about a complex architecture and I understand how to handle such things in Go without creating a lot of mess, but I cannot imagine doing that in other languages or toolsets.
77-
78-
[![](https://developer.nvidia.com/sites/default/files/akamai/gameworks/blog/Vulkan/vulkan_intro_management.png)](https://developer.nvidia.com/engaging-voyage-vulkan)
79-
80-
Let the VGo adventure begin.
81-
82-
## Good stuff
108+
## Useful links
83109

84-
* [VGo Home](https://github.com/vulkan-go)
110+
* [vulkanGo.com](https://vulkanGo.com)
85111
* [SaschaWillems Demos (C++)](https://github.com/SaschaWillems/Vulkan)
112+
* [LunarG Vulkan Samples](https://github.com/LunarG/VulkanSamples)
86113
* [Official list of Vulkan resources](https://www.khronos.org/vulkan/resources)
87114
* [Vulkan API quick reference](https://www.khronos.org/registry/vulkan/specs/1.0/refguide/Vulkan-1.0-web.pdf)
88-
* [Qt for Go](https://github.com/therecipe/qt) (when you're tired of vulkan)
89115

90116
## License
91117

0 commit comments

Comments
 (0)