WebGPU is the Future of Graphics Development, in D as Well

  • Platform and vendor independence matter almost equally much. You want your code to be portable seamlessly across operating systems, and you don’t want to wait for a new version of a high-level engine (that would probably also break your code) each time when you run into a bug or want to use functionality that otherwise could be added in a few minutes. Your own engine based on a standard graphics API gives you such flexibility. So directly using OpenGL is better that using a ready engine. The sad part is, OpenGL is not supported equally well on all platforms. It is also getting old, and it’s obvious that an “OpenGL way” of writing graphics code is currently at its dead end.
  • Vulkan may seem as a replacement for OpenGL, but actually it’s not. Due to the specificity of Vulkan’s architecture, it can’t be just “added” to an existing single-API engine. OpenGL functionality doesn’t map one-to-one to Vulkan. The way to go is to use a mid-level graphics library with API-specific code at the backend. Any big commercial engine already does it, but until recently there was no widely accepted standard for a middleware like that. And guess what — WebGPU has full potential to become such a standard!
WGPURenderPipelineDescriptor rpDesc = {
label: “Render pipeline”,
layout: pipelineLayout,
vertex: {
modul: shaderModule,
entryPoint: “vs_main”,
bufferCount: 0,
buffers: null
},
primitive: {
topology: WGPUPrimitiveTopology.TriangleList,
stripIndexFormat: WGPUIndexFormat.Undefined,
frontFace: WGPUFrontFace.CCW,
cullMode: WGPUCullMode.None
},
multisample: {
count: 1,
mask: ~0,
alphaToCoverageEnabled: false
},
fragment: &fs,
depthStencil: null
};

--

--

--

Computer graphics developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Readability Score — Pros & Cons

Let’s Encrypt Wildcard Certificate Configuration with AWS Route 53

Yellow.ai Hiring Freshers-2021/22 For Software Engineer Position: Apply Now

Railway Oriented Programming : A powerful Functional Programming pattern

CS373 Spring 2020 Final Entry: Toby Liu

How Udacity-Google India scholarship changed my life.

Designing Microservices: Characteristics of a Service

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Timur Gafarov

Timur Gafarov

Computer graphics developer

More from Medium

Propagation of Order and Sorting Algorithms

Exploring Healthcare Design Series: Introduction and A Recent Experience

What A $95 Air Filter Can Teach You About Making Money From Your Expertise

automotive air filter

CS373 Spring 2022: Nisha Ramesh