Skip to content

mua/nuklear-glfw-vulkan

 
 

Repository files navigation

nuklear-glfw-vulkan

An adapter to make nuklear play with vulkan and glfw

screenshot

Usage

Download the latest release from the Releases tab. Then check overlay.h/overlay.c to get an idea how to use it.

Build requirements

The implementation itself has been done using C99 so far. It is using designated initializers which are not supported by C++ compilers. This is subject to change in a later version.

As a result the example overlay only compiles using a C99 compiler.

The background however is a slighly modified version of the excellent https://www.vulkan-tutorial.com and will require a C++ compiler.

The Vulkan SDK and a Vulkan capable graphics card are obviously also required.

xxd should be installed on linux out of the box. For windows it was part of the git distribution.

Compatibility

  • works on Windows and Linux
  • Android support in progress (input events a bit off)

Building the project

  • Clone repo
  • Configure the project with CMake
  • build

Generating release header

Windows

Assuming your build directory is build

cmake --build .\build\ --config Debug --target release

Linux

Assuming your build directory is build (untested as of now)

(cd build && make release)

Afterwards there should be a nuklear-glfw-vulkan.h file in your build/release directory containing a standalone version which has all the shaders inlined.

Please ignore any compile warnings (but report errors!). There is a simple compile check in place which just checks that replacing the shaders worked.

TODOs

  • Proper buildchain that outputs a single header only file (building blocks all there)
  • Clarify where external requirements should be placed (glfw, nuklear)
  • Fix wacky input
  • Use correct blending (currently somewhat off)
  • implement resize
  • check performance
  • cross platform tests
  • proper example (incl. interaction)
  • dynamic scissor
  • implement test to check if released header works

Acknowledgements

  • Alexander Overvoorde for his excellent tutorial
  • Sascha Willems for his vulkan examples

You will find that I used large portions of the code from their repos.

Also the creators of nuklear and glfw obviously :)

The adapter is based on the glfw_opengl3 variant of nuklear.

About

A nuklear adapter that does Vulkan rendering

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 53.9%
  • HTML 39.9%
  • Objective-C 2.8%
  • CSS 0.8%
  • JavaScript 0.8%
  • CMake 0.8%
  • Other 1.0%