mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 13:33:34 +00:00
webgpu: device;
This commit is contained in:
parent
15d27fc91f
commit
d66b1e7ec8
|
@ -1,10 +1,18 @@
|
|||
#include "gpu.h"
|
||||
#include <webgpu/webgpu.h>
|
||||
#include <emscripten/html5_webgpu.h>
|
||||
#include <string.h>
|
||||
|
||||
static struct {
|
||||
WGPUDevice device;
|
||||
} state;
|
||||
|
||||
bool gpu_init(gpu_config* config) {
|
||||
return false;
|
||||
state.device = emscripten_webgpu_get_device();
|
||||
return !!state.device;
|
||||
}
|
||||
|
||||
void gpu_destroy(void) {
|
||||
//
|
||||
if (state.device) wgpuDeviceDestroy(state.device);
|
||||
memset(&state, 0, sizeof(state));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue