Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've always liked this illustration: Code to draw a triangle in 1. OpenGL 1.x, 2. OpenGL 3+, 3 Vulkan [1].

1: http://sol.gfxile.net/temp/hellotriangle.png



It is pretty wild, though mine wasn't quite as bad. It ended up clocking in at 650 lines. I guess part of that is because nim doesn't have braces... https://github.com/oakes/vulkan_triangle_nim/blob/master/src...


It's decidedly not optimized for hello world style examples, but it's a lot nicer once you have a non trivial codebase, IMO.


supposedly code the draw doom 4 is less with vulkan than opengl though


> glfwCreateWindow(..., "The spinning triangle that took 1397 lines of code", ...);

I get it, Vulkan is low level, but still.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: