In WebGPU am I supposed to load my function pointers in an initialise function beforehand?

63 Views Asked by At

If I follow a WebGPU tutorial for Dawn(Google's implementation of WebGPU) the tutorial simply starts off immediately with:

WGPUInstanceDescriptor instance_info{ .nextInChain = nullptr }; wgpu_instance = wgpuCreateInstance(&instance_info);

When I do this my program crashes because it seems to call a function pointer which is currently null (or at least invalid). I have the feeling that you're supposed to manually load a proctable (the function pointers), but I can't find any information on how to do this. Is there an initialise function or something?

0

There are 0 best solutions below