Repository: playcanvas/engine
File: src/platform/graphics/graphics-device.js (JavaScript)

Code before:
    }

    /**
     * Clears the vertex buffer set on the graphics device. This is called automatically by the
     * renderer.
     * @ignore
     */
    clearVertexBuffer() {
        this.vertexBuffers.length = 0;
    }

    /**
     * Retrieves the slot in internal {@link StorageBuffer}, which is used for indirect rendering.
     * This slot can be used in by a {@link Compute} to generate indirect draw parameters, and by
     * setting up indirect drawing by using {@link MeshInstance#setIndirect}.
     *
     * @returns {number} - The slot used for indirect rendering.
     */
    getIndirectDrawSlot() {
        return 0;
    }

    /**
     * Returns the buffer used to store arguments for indirect draw calls. The size of the buffer is
     * controlled by the {@link GraphicsDevice#maxIndirectDrawCount} property. This buffer can be
     * passed to {@link Compute} shader along with a slot obtained by calling
     * {@link GraphicsDevice#getIndirectDrawSlot}, in order to prepare indirect draw parameters.
     * Also see {@link MeshInstance#setIndirect}.
     * Only available on WebGPU, returns null on other platforms.
     *
     * @type {StorageBuffer|null}
     */
    get indirectDrawBuffer() {
        return null;
    }

    /**
     * Queries the currently set render target on the device.
     *
     * @returns {RenderTarget} The current render target.
     * @example
     * // Get the current render target
     * const renderTarget = device.getRenderTarget();
     */
    getRenderTarget() {
        return this.renderTarget;
    }

    /**
     * Initialize render target before it can be used.
     *

Review comment (suggestion):
```suggestion
     * passed to a {@link Compute} shader along with a slot obtained by calling
```

Code after:
    }

    /**
     * Clears the vertex buffer set on the graphics device. This is called automatically by the
     * renderer.
     * @ignore
     */
    clearVertexBuffer() {
        this.vertexBuffers.length = 0;
    }

    /**
     * Retrieves the available slot in the {@link indirectDrawBuffer} used for indirect rendering,
     * which can be utilized by a {@link Compute} shader to generate indirect draw parameters and by
     * {@link MeshInstance#setIndirect} to configure indirect draw calls.
     *
     * @returns {number} - The slot used for indirect rendering.
     */
    getIndirectDrawSlot() {
        return 0;
    }

    /**
     * Returns the buffer used to store arguments for indirect draw calls. The size of the buffer is
     * controlled by the {@link maxIndirectDrawCount} property. This buffer can be passed to a
     * {@link Compute} shader along with a slot obtained by calling {@link getIndirectDrawSlot}, in
     * order to prepare indirect draw parameters. Also see {@link MeshInstance#setIndirect}.
     *
     * Only available on WebGPU, returns null on other platforms.
     *
     * @type {StorageBuffer|null}
     */
    get indirectDrawBuffer() {
        return null;
    }

    /**
     * Queries the currently set render target on the device.
     *
     * @returns {RenderTarget} The current render target.
     * @example
     * // Get the current render target
     * const renderTarget = device.getRenderTarget();
     */
    getRenderTarget() {
        return this.renderTarget;
    }

    /**
     * Initialize render target before it can be used.
     *