playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
23 lines (20 loc) • 742 B
JavaScript
import { DebugGraphics } from '../../platform/graphics/debug-graphics.js';
import { RenderPass } from '../../platform/graphics/render-pass.js';
/**
* A render pass implementing rendering of a QuadRender.
*/ class RenderPassQuad extends RenderPass {
execute() {
const { device } = this;
DebugGraphics.pushGpuMarker(device, `${this.name}:${this.quad.shader.name}`);
device.setDrawStates(device.blendState);
this.quad.render(this.rect, this.scissorRect);
DebugGraphics.popGpuMarker(device);
}
constructor(device, quad, rect, scissorRect){
super(device);
this.quad = quad;
this.rect = rect;
this.scissorRect = scissorRect;
}
}
export { RenderPassQuad };