Vulkan-Hpp | Open-Source Vulkan C++ API | Build Tool library
kandi X-RAY | Vulkan-Hpp Summary
kandi X-RAY | Vulkan-Hpp Summary
Open-Source Vulkan C++ API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Vulkan-Hpp
Vulkan-Hpp Key Features
Vulkan-Hpp Examples and Code Snippets
Community Discussions
Trending Discussions on Vulkan-Hpp
QUESTION
I'm trying to include vulkan hpp library using cmake with fetch_content (I want to automate this and I don't want the user to manually install vulkan, if this is a wrong approach let me know because I'm just starting with cmake) as shown in the following code snippet
...ANSWER
Answered 2021-Sep-13 at 17:06The repository you specified does not actually contain the Vulkan headers. Use this instead. It provides a CMakeLists.txt
file which adds the headers to a library called Vulkan::Headers
so you can just add the subdirectory and then link to them using target_link_libraries(example PRIVATE Vulkan::Headers)
.
But why would you do this? To use Vulkan you have to have the Vulkan SDK installed (the actual libraries) and the SDK also includes the headers.
QUESTION
1st of all I rewrote the Vulkan tutorial triangle in vulkan-hpp with unique handles. When closing the program i got the following assertion: Assertion: m_dispatch && m_owner
Looking at the code, I found out enabling VULKAN_HPP_NO_EXCEPTIONS would fix it but now I get this error:
vk::UniqueHandle &vk::UniqueHandle::operator =(const vk::UniqueHandle &)': attempting to reference a deleted function
Here's my code:
...ANSWER
Answered 2021-Apr-04 at 21:28This seems to work for me:
QUESTION
I'm developping a game engine using vulkan and glfw. As indicated here, with glfw there's a bunch of macros to include OpenGL/OpenGL ES/Vulkan. Since it is now included in the vulkan sdk, how can I setup glfw to include vulkan-hpp. Do I just need to put GLFW_INCLUDE_NONE and add #include
or do I need to implement something else?
ANSWER
Answered 2021-Jan-15 at 19:37If we take a look at GLFW.h
, it just includes vulkan.h
only if the GLFW_INCLUDE_VULKAN
macro is defined. So if you want to include the vulkan.hpp
file, just undefine the GLFW_INCLUDE_VULKAN
macro and include the file explicitly.
Why?
GLFW is a C library. vulkan.hpp
file contains C++ stuff inside so there could be compatibility issues. That's why GLFW only includes vulkan.h
and not vulkan.hpp
.
QUESTION
Where I can find C++ specification for Vulkan (same like the official C one on Khornos pages), describing the particular Vulkan api primitives and functions? Does it even exist (I was trying to find it with no success)?
Personaly I am using the C api even with C++ as I already got used to its style and it fits my needs perfectly (verbose, but you see everything), but I have to go through the code written by other people using C++ api. Usually Vulkan C++ api is just some syntactic sugar build upon the C api function calls, but sometimes digging through vulkan.hpp and trying to figure out what is going on is really annoying.
I am aware of this: https://github.com/KhronosGroup/Vulkan-Hpp
...ANSWER
Answered 2020-Sep-25 at 17:44There is no "Vulkan C++ specification". There's a header file containing some functions and types that make using Vulkan more C++-friendly. But those are not part of any actual specification.
The mapping from "VulkanHpp" into regular C Vulkan is pretty obvious in most cases and can be deduced just from the nature of the APIs in question. vk::ImageCreateInfo
means the same thing, with the same fields, as VkImageCreateInfo
as defined by the Vulkan specification. The C++ wrapper is not trying to confuse users as to how it works.
QUESTION
I have tried to get this to work using several methods and no matter what I keep getting:
...ANSWER
Answered 2020-Apr-24 at 05:28This is caused by the vulkan.hpp
C++ header. It assumes that all functions are present, which is not the case for extension functions (that aren't part of the core). So you need to pass a dynamic dispatcher to the messenger callback creation function.
I'm not using vulkan.hpp
myself, but it should look something like this in your case:
QUESTION
I have been having a look into the vulkan-hpp source code to try to understand how to manage StructureChain
s. I've found this odd looking syntax (line marked with comment) related with the usage of template
keyword as a member type. Moreover, its followed by a function call with no ;
preceding.
ANSWER
Answered 2020-Feb-03 at 14:26This template
keyword is used to disambiguate the following expression as a template instantiation.
structureChain
type depends on template parameters, so the compiler cannot know how to interpret the following get
expression, which may be an instantiation of a get
template, or comparison expression. The template
keyword indicates that get
is a template, and the following is a template instantiation. In the absence of this keyword the compiler would assume get
is not a template, so the following must be a comparison expression.
See here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Vulkan-Hpp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page