UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

24 lines (23 loc) 941 B
/** * @import { DynamicBufferAllocation } from '../dynamic-buffers.js' * @import { GraphicsDevice } from '../graphics-device.js' */ /** * A Null implementation of the dynamic buffers system. It hands out CPU-only storage so the * renderer's (unconditional) view uniform buffer path runs without errors and uploads nothing. A * single base DynamicBuffer is reused for every allocation - it provides getBindGroup (which caches * per uniform buffer size) and a no-op upload, which is all the null device needs. * * @ignore */ export class NullDynamicBuffers extends DynamicBuffers { /** * @param {GraphicsDevice} device - The graphics device. */ constructor(device: GraphicsDevice); /** @type {DynamicBuffer} */ buffer: DynamicBuffer; } import { DynamicBuffers } from '../dynamic-buffers.js'; import { DynamicBuffer } from '../dynamic-buffer.js'; import type { GraphicsDevice } from '../graphics-device.js';