Live data from Hacker News

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

github.com

61–70 of 76 posts

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

#61
post #59
post #58

Earlier quoted context omitted.

What people? Indies and FOSS activists that probably still write M$ to this day and believe that Sony and Nintendo or even Sega in its former days are any different. I really bet none of those ever walked the floors of GDC.

> What people? Anyone who thinks and cares about progress and doesn't drink Koolaid served by MS and Co. Surely not lock-in freaks, who frame their tax on the industry as something positive. > I really bet none of those ever walked the floors of GDC. You sound like GDC is owned by MS, or it's ought to be. Are you paid by them? Either way, it's a very poor way to measure opinions or their value. Find something better.

No, I am someone that in a past life was allowed to spend some time in the backstage how big boys do games and still keep some of those ties, even though I just do IT enterprise consulting nowadays.

No one in GDC hallways speak of lock-in as activists believe they do.

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

#62
post #61
post #59

Earlier quoted context omitted.

> What people? Anyone who thinks and cares about progress and doesn't drink Koolaid served by MS and Co. Surely not lock-in freaks, who frame their tax on the industry as something positive. > I really bet none of those ever walked the floors of GDC. You sound like GDC is owned by MS, or it's ought to be. Are you paid by them? Either way, it's a very poor way to measure opinions or their value. Find something better.

No, I am someone that in a past life was allowed to spend some time in the backstage how big boys do games and still keep some of those ties, even though I just do IT enterprise consulting nowadays. No one in GDC hallways speak of lock-in as activists believe they do.

> No one in GDC hallways speak of lock-in as activists believe they do.

There were many talks on GDC about Vulkan which discussed lock-in issues that it can solve.

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

#63
post #62
post #61

Earlier quoted context omitted.

No, I am someone that in a past life was allowed to spend some time in the backstage how big boys do games and still keep some of those ties, even though I just do IT enterprise consulting nowadays. No one in GDC hallways speak of lock-in as activists believe they do.

> No one in GDC hallways speak of lock-in as activists believe they do. There were many talks on GDC about Vulkan which discussed lock-in issues that it can solve.

Done by AMD, Imagination, Valve and Google, sponsored by Khronos, out of kindness and without any hidden agenda to push Vulkan....

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

#64
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.

>And people wonder why C++ programs compile so slowly.

People have been aware of this problem for some time. It's one of the reasons the C++ community is trying to develop a proper module system (or was the last time I checked, which was a while back).

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

#65

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.

It's a new API, and a much more low level one. Meaning you need more code to do stuff, but you have more control over each step, which wasn't available to you in previous APIs.

For example, capturing a game screenshot. In OpenGL you have a method glReadPixels which will flush the GPU queue, wait for operations to finish, read the screen pixels, convert them and put them into an array. All in one method, all outside of programmer's control, done somewhere in the driver. Meanwhile in Vulkan, same task requires programmer to flush GPU, wait for operations to finish, allocate memory for an image, create an image in linear format, transition image to proper state (transfer destination), transition swapchain image to transfer source, blit the pixels from swapchain image (which could be linear, could be tiled) to linear image, transition swapchain image back, map memory of the linear image. A single line of code in OpenGL translates to about 50 lines of Vulkan code (lot of it is stuff you'll write once and reuse everywhere else), but you have full control over each of the steps.

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

#66

Whoa now that is cool! Are there any games out there that currently use this C++ API of Vulkan? Very curious to know if there are any major issues with using it versus the direct C API. I'm not very knowledge regarding Vulkan so hopefully that isn't a stupid question but I want to brush up on my C++ skills and play with this! Also how similar is Vulkan to SDL? I used to use SDL quite a bit back in the day and it was…

> Also how similar is Vulkan to SDL?

They are not. You use SDL to create and manage your window and handle input, and use Vulkan or OpenGL to draw to that window.

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

#67
post #64
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.

>And people wonder why C++ programs compile so slowly. People have been aware of this problem for some time. It's one of the reasons the C++ community is trying to develop a proper module system (or was the last time I checked, which was a while back).

By the time C++ has a working module system it will be as relevant as Fortran is now.

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

#68
post #64

Earlier quoted context omitted.

>And people wonder why C++ programs compile so slowly. People have been aware of this problem for some time. It's one of the reasons the C++ community is trying to develop a proper module system (or was the last time I checked, which was a while back).

By the time C++ has a working module system it will be as relevant as Fortran is now.

There's an experimental module system already in Visual C++, and I think in clang as well. It will be in the 2019 standard at the very latest.

I like Rust and all, but C++ isn't going away in the next three years.

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

#69
post #39

Earlier quoted context omitted.

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…

The easy ability to assign it to a vanilla integer or cast it implicitly (through an arithmetic operator or comparison for example) is what I mean when I say they aren't typesafe. A warning is also a fair bit weaker than a flat out compile error, although I'll grant that compiling with -Werror (a really challenging thing for most companies) alleviates that.

Yeah, it isn't real type safety. That said, don't assign enums through vanilla integers if you don't have to. :-)

Our engineering organization of 300+ people builds the majority of our code with -Werror (and a bunch of warnings enabled). Just an anecdote, of course.

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

#70
post #63
post #62

Earlier quoted context omitted.

> No one in GDC hallways speak of lock-in as activists believe they do. There were many talks on GDC about Vulkan which discussed lock-in issues that it can solve.

Done by AMD, Imagination, Valve and Google, sponsored by Khronos, out of kindness and without any hidden agenda to push Vulkan....

You claimed no one talks about it on GDC. So which one is it? No one, or some do? Just admit your statement was false.

And surely you don't expect MS and its cahoots to talk about lock-in. They are pushing it to mess up everyone else, so they aren't going to bring this crooked practice into the spotlight.

Post reply on HN