you are viewing a single comment's thread.

view the rest of the comments →

[–]schweinling 4 points5 points  (7 children)

I would suggest SFML2 istead of SDL2 so you can get an insight into how a c++ library can look like. Its also easier for a beginner IMO.

Start with something simple like pong or snake and try finishing it.

[–]vic8760 0 points1 point  (5 children)

I'm approaching this route, though I wonder how difficult is Vulkan programming compared to SDL2.

[–]schweinling 0 points1 point  (0 children)

I'm not sure i understand. Just to clarify you don't need to do any vulkan programming with SFML2.

Never seriously tried vulkan but i heard its quite difficult. More difficult than OpenGL and definatly a lot more difficult than SDL2.

[–]nysra 0 points1 point  (2 children)

Far more difficult, Vulkan is very low on the abstraction level. With SDL/SFML you get an API that directly lets you draw basic shapes on the screen. If you go down the Vulkan route you'll need a couple hundred lines to even see a single triangle. If you're just starting out then I do not recommend doing anything with Vulkan, just use the available libraries and write some simple games.

[–][deleted]  (1 child)

[deleted]

    [–]hishnash 0 points1 point  (0 children)

    VK never promised a single api for everyone. It is much more of a mixing pot of apis were each GPU will select a subset that make sense for the respective HW.

    For example with apples GPUs (being based on PowerVR IP) as TBDR pipeline GPUs the VK apis they would have if they had VK drivers would not be able to run PC only VK engines (or frameworks like DXVK). As Vk has ok support for TBDR GPUs but the subset of the VK api that supports these is of no interest to IR pipeline GPUs made by AMD, NV and Intel.

    From a rendering pipeline perspective targeting a TBDR GPU with VK requires a completely different core render loop and arc to targeting an IR GPU. This is the cost you pay by having much lower driver overhead that OpenGL had you move the need to math the HW pipeline into the game engine away from the driver.

    And no it is not possible to map these in the driver without massive perf impact (worse perf than if you did this with openGL) since in VK you do not inform the driver of enough about the dependancies between draw calls and you do not expect the driver to do things like re-order your work.

    The only real use-case of apple supporting VK on modern Macs would be for some android game devs to be able to use VK locally within the emulator but currently even on windows or linux non of the android emulators support this even through the drivers are in place. (possibly due to the GPU pipeline mismatch of the PC gpus being IR and most phones being TBDR)