Skip to content
DevMeme
2912 of 7590
Graphics Post #3218 · source on Telegram

Web Devs Meet the Harsh Reality of Low-Level Graphics APIs

Description

The image is a multi-panel meme that contrasts the perceived difficulty of web development with the complexity of low-level graphics programming. At the top, a line of text reads, 'web devs: wtf html5 canvas is so hard surely there must be an easier way to draw a triangle'. Below this text are three separate, popular 'laughing hysterically' meme images, each with a technology logo superimposed on the person's face. On the left is Tom Cruise laughing, labeled 'OpenCL'. On the right is the 'Spanish Laughing Guy' (El Risitas), labeled 'Vulkan'. At the bottom is J. Jonah Jameson from Spider-Man, labeled 'DirectX'. The joke is aimed at experienced engineers who understand the vast difference in complexity. While HTML5 Canvas has its learning curve, drawing a triangle is a relatively straightforward task. In stark contrast, low-level APIs like Vulkan, DirectX, and OpenCL require hundreds, if not thousands, of lines of boilerplate code just to set up the rendering pipeline before a single triangle can be drawn. The meme hilariously frames these powerful but notoriously difficult APIs as laughing at the web developer's comparatively minor struggles

Comments

39
Anonymous ★ Top Pick A web dev needs a library to draw a triangle. A graphics programmer needs a therapist after writing 1000 lines of Vulkan boilerplate to clear the screen to black
  1. Anonymous ★ Top Pick

    A web dev needs a library to draw a triangle. A graphics programmer needs a therapist after writing 1000 lines of Vulkan boilerplate to clear the screen to black

  2. Anonymous

    Canvas feels verbose? Just fire up Vulkan, allocate a swapchain and a few descriptor sets - because nothing says “simple triangle” like 500 lines of boilerplate and a SPIR-V toolchain wedged into your webpack build

  3. Anonymous

    Nothing says 'I just wanted to draw a triangle' quite like writing 500 lines of boilerplate to initialize a Vulkan instance, configure the swap chain, set up render passes, compile SPIR-V shaders, and manage synchronization primitives - all while your PM wonders why the landing page animation is taking three sprints

  4. Anonymous

    Ah yes, the classic developer support pattern: complaining about Canvas's verbose path API for drawing a simple triangle, only to be 'helpfully' directed toward OpenCL compute kernels, Vulkan descriptor sets and pipeline state objects, or DirectX's HLSL shaders and swap chains. Because nothing says 'easier' like manually managing GPU memory, writing vertex shaders, and debugging synchronization primitives just to render three vertices. It's the graphics programming equivalent of asking how to hammer a nail and being handed a particle accelerator - technically capable of the task, but with a learning curve measured in years and a setup complexity that makes webpack configs look like haiku

  5. Anonymous

    Canvas too hard? The “easier” path is just a swapchain, a render pass, a pipeline state, descriptor sets, command buffers, and a few pipeline barriers away - then you can finally draw that one triangle

  6. Anonymous

    Canvas too hard? Swap it for Vulkan's render passes and descriptor sets - because who needs ctx.beginPath when you can validate SPIR-V for a single triangle?

  7. Anonymous

    An “easy triangle” is five lines on canvas - or 500 lines of Vulkan boilerplate that still renders a black screen until you remember the image-layout transition

  8. @sylfn 5y

    Windows GDI: exists

  9. @RiedleroD 5y

    …OpenCL is for doing shit on a graphics card that doesn't involve drawing, but ok. You mean OpenGL most likely.

    1. @L2CacheGay 5y

      ya can raytrace with ray queues on opencl

      1. @RiedleroD 5y

        can and should are two different things

      2. @sylfn 5y

        that is much easier than opengl 3 and opengl FFP (fixed function), yes?

        1. @L2CacheGay 5y

          the whole point of the joke is that its harder though, so whats your point

          1. @RiedleroD 5y

            let's just all draw with the CPU. Who needs a graphics card?

            1. @sylfn 5y

              lets draw on paper. who needs a computer?

    2. @nuntikov 5y

      Yeap

  10. @pavloalpha 5y

    opencl???????????????????????????

  11. @RiedleroD 5y

    *flashbacks to fucking java swing paintComponent nightmares*

  12. @sylfn 5y

    pen + paper: am i joke to you?

  13. @nuntikov 5y

    Pain

  14. @sylfn 5y

    <img src="triangle.png"></img>

    1. @antoshor 5y

      </img> norm

    2. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

      <path data="M 0.5,0 0,1 1,1 z"/>

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

        Sorry if this is incorrect I can't remember exactly

      2. @RiedleroD 5y

        <path d="M0.5 0 1 1 0 1z"/> if that's supposed to be SVG

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

          Yeah thanks

          1. @RiedleroD 5y

            np, I've spent way too much time manually writing those

        2. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

          In UWP its a little different but the same principle

          1. @panKrysha 5y

            Don't use UWP

            1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

              I use it because others can't

              1. @panKrysha 5y

                You will never be as good as mister Fela, deal with it

                1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

                  It seems like you can't remember my Store and The ide I am working on. Also I use pure UWP he has stuff like the image viewer that is Win32 (or .NET idk) and that wont run on xbox either

                  1. @panKrysha 5y

                    Unigram has no Win32 parts

                    1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

                      Then .NET

                    2. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

                      You are right https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.primitives.popup.shouldconstraintorootbounds

  15. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

    DirectX 😭😭😭😭

    1. @sylfn 5y

      even Carmack rejected it...

  16. @panKrysha 5y

    You use a dead thing and you will never be the best 🤪

    1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

      I use what I want unless MS prevents me

Use J and K for navigation