UNPKG

simple-nvk

Version:

Graphic libary, using Javascript and Node-Vulkan.<br> It has similarities to WebGPU in some places.<br> ## Features Abstractions of Vulkan features like staged buffers.<br> Much shorter to write than Vulkan.<br> ## Install ````console npm install s

19 lines (15 loc) 525 B
import { assertVulkan } from "../utils.mjs"; import Handle from "./handle.mjs"; export default class SemaphoreHandle extends Handle { constructor(owner, createInfo) { super(owner); let semaphoreCreateInfo = new VkSemaphoreCreateInfo(); let semaphore = new VkSemaphore(); vkCreateSemaphore(this.device, semaphoreCreateInfo, null, semaphore); this.vkSemaphore = semaphore; } destroy() { this.super_destroy(); vkDestroySemaphore(this.device, this.vkSemaphore, null); } }