"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Rendering
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.RenderTarget = exports.PrimitiveVisibility = void 0;
const Symbols_1 = require("../common/internal/Symbols");
/** Used for debugging purposes, to toggle display of instanced or batched primitives.
 * @see [[RenderTargetDebugControl]].
 * @internal
 */
var PrimitiveVisibility;
(function (PrimitiveVisibility) {
    /** Draw all primitives. */
    PrimitiveVisibility[PrimitiveVisibility["All"] = 0] = "All";
    /** Only draw instanced primitives. */
    PrimitiveVisibility[PrimitiveVisibility["Instanced"] = 1] = "Instanced";
    /** Only draw un-instanced primitives. */
    PrimitiveVisibility[PrimitiveVisibility["Uninstanced"] = 2] = "Uninstanced";
})(PrimitiveVisibility || (exports.PrimitiveVisibility = PrimitiveVisibility = {}));
/** Connects a [[Viewport]] to a graphics renderer such as a [WebGLRenderingContext](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext)
 * to enable the viewport's contents to be rendered to the screen or to an off-screen buffer.
 * Application code never interacts directly with a `RenderTarget` - it interacts with the `Viewport`'s API which forwards requests to the `RenderTarget`.
 * @public
 */
class RenderTarget {
    /** @internal */
    pickOverlayDecoration(_pt) { return undefined; }
    /** @internal */
    get devicePixelRatio() { return 1; }
    /** @internal */
    cssPixelsToDevicePixels(cssPixels, floor = true) {
        const pix = cssPixels * this.devicePixelRatio;
        return floor ? Math.floor(pix) : pix;
    }
    /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.
     * Used when computing LOD for graphics.
     */
    /** @internal */
    adjustPixelSizeForLOD(cssPixelSize) {
        return this.renderSystem.dpiAwareLOD ? this.cssPixelsToDevicePixels(cssPixelSize, false) : cssPixelSize;
    }
    /** @internal */
    get animationBranches() { return undefined; }
    set animationBranches(_transforms) { }
    /** @internal */
    get antialiasSamples() { return 1; }
    set antialiasSamples(_numSamples) { }
    /** @internal */
    assignFrameStatsCollector(_collector) { }
    /** Update the solar shadow map. If a SceneContext is supplied, shadows are enabled; otherwise, shadows are disabled. */
    /** @internal */
    updateSolarShadows(_context) { }
    /** @internal */
    getPlanarClassifier(_id) { return undefined; }
    /** @internal */
    createPlanarClassifier(_properties) { return undefined; }
    /** @internal */
    getTextureDrape(_id) { return undefined; }
    /** @internal */
    createGraphicBuilder(options) {
        return this.renderSystem.createGraphic(options);
    }
    /** @internal */
    dispose() { }
    /** @internal */
    reset() { }
    /** @internal */
    overrideFeatureSymbology(_ovr) { }
    /** @internal */
    setHiliteSet(_hilited) { }
    /** @internal */
    setFlashed(_elementId, _intensity) { }
    /** @internal */
    onBeforeRender(_viewport, _setSceneNeedRedraw) { }
    /** @internal */
    onResized() { }
    /** @deprecated in 3.x. use readImageBuffer
     * @internal
     */
    readImage(_rect, _targetSize, _flipVertically) { return undefined; }
    /** @internal */
    readImageBuffer(_args) { return undefined; }
    /** @internal */
    readImageToCanvas() { return document.createElement("canvas"); }
    /** @internal */
    collectStatistics(_stats) { }
    /** Specify whether webgl content should be rendered directly to the screen.
     * If rendering to screen becomes enabled, returns the canvas to which to render the webgl content.
     * Returns undefined if rendering to screen becomes disabled, or is not supported by this RenderTarget.
     */
    /** @internal */
    setRenderToScreen(_toScreen) { return undefined; }
    /** @internal */
    get debugControl() { return undefined; }
    /** Implementation for [[Viewport.queryVisibleFeatures]]. Not intended for direct usage. The returned iterable remains valid only for the duration of the
     * Viewport.queryVisibleFeatures call.
     */
    /** @internal */
    queryVisibleTileFeatures(_options, _iModel, callback) {
        callback([]);
    }
}
exports.RenderTarget = RenderTarget;
//# sourceMappingURL=RenderTarget.js.map