Live data from Hacker News

Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

github.com

31–40 of 76 posts

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#32
post #17

Earlier quoted context omitted.

And there is DX12 support for those?

Yes for the XBox ONE, although there are some small differences with the desktop version, at least until the upcoming Aniversary update. But the point he was making was that there is no need for DX12 because Vulkan works everywhere else. Right now Vulkan is only supported on custom Android 6 forks for Samsung S7 and NVidia Shield, Android 7, GNU/Linux and Windows on a restricted set of graphic cards. Hardly a market…

Vulkan market is MUCH bigger than DX12 market right now, no matter how you put it. It's like at least 3-4x bigger.

Just think how much more popular Windows 7 is compared to DX12. Xbox One is nothing in comparison.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#34

Vulkan is an NVIDIA gpu api. https://www.khronos.org/vulkan/

Whoa holy smokes yeah I missed the mark on that one. So Vulkan is a replacement for openGL, essentially a new api to gpu's in general? Is that closer to it? In the future I'll phrase the statement as a question if I'm not 100% clear on it. Sorry for the noise.

> In the future I'll phrase the statement as a question

after you google it first, please.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#35
post #31

So hold on. Assuming that I understand C++ linking right, you're saying that I should include this 17000-line file in every single cpp unit in my application that uses Vulkan APIs? And people wonder why C++ programs compile so slowly.

You may understand the mechanics of C++ linking (although I doubt it because including a header has nothing to do with linkage, I'm assuming you mean ADL, overload resolution, etc), but it doesn't seem you understand the mechanics of how C++ compilers are built and optimized. Furthermore, how many cpp units do you expect to require the Vulkan API? If it's much more than a few dozen, I would argue you haven't organized your engine well. Source: former graphics engineer.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#36
post #5

A lot of their "improvements" could be done just by using C99 designated initializers.

And why are they claiming C doesn't have type-safe enums?

Because C doesn't have type-safe enums.

edit: for the downvoters, I'd LOVE to be happily corrected with a link to documentation about C language support for a type safe enum.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#37
post #5

A lot of their "improvements" could be done just by using C99 designated initializers.

I don't know why this is downvoted. Several of the author's claims about C are just wrong. Modern C compilers can warn you about most of these, and literal initializers eliminate the missed zero initializations.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#38

Vulkan is an NVIDIA gpu api. https://www.khronos.org/vulkan/

Just to add to the issues with this statement, Vulkan doesn't necessarily target a "GPU" since a CPU can also render frames just fine. More accurately, Vulkan, like DX12 is a graphics/compute API, with the distinction between graphics and compute pretty blurred at this point.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#39

Earlier quoted context omitted.

And why are they claiming C doesn't have type-safe enums?

Because C doesn't have type-safe enums. edit: for the downvoters, I'd LOVE to be happily corrected with a link to documentation about C language support for a type safe enum.

It isn't type-safe in the sense you're used to in C++. But common pitfalls can be avoided if you don't destroy the type information by assigning through a vanilla integer.

    enum a { A };
    enum b { B };
    
    static enum a a = B;
$ clang -Wenum-conversion -Werror a.c

    b.c:4:19: error: implicit conversion from enumeration type 'enum b' to different enumeration type 'enum a' [-Werror,-Wenum-conversion]
    static enum a a = B;
                  ~   ^
    1 error generated.

Re: Introducing Vulkan-Hpp – Open-Source Vulkan C++ API

#40
post #2

Enjoying Vulkan so far in the recently patched Doom, which netted me a minimum 10% increase in frames per second. I really hope this gets adopted / patched into current games, and those on the horizon. Seems like a big win for cross platform development.

The problem is that Vulkan isn't so much a replacement for OpenGL as it is a library that you can use to write OpenGL in the first place, it's another layer removed, and hence requires quite a lot of work to integrate.
Post reply on HN