/** @packageDocumentation * @module Rendering */ import { IDisposable } from "@bentley/bentleyjs-core"; /** Represents a texture image applied to a surface during rendering. * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]]. * @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image. * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element. * @public */ export declare abstract class RenderTexture implements IDisposable { /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend). * Textures created on the front-end generally have no key. */ readonly key: string | undefined; /** Indicates the type of texture. */ readonly type: RenderTexture.Type; /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately. * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed. */ readonly isOwned: boolean; get isTileSection(): boolean; get isGlyph(): boolean; get isSkyBox(): boolean; abstract get bytesUsed(): number; protected constructor(params: RenderTexture.Params); /** Releases any WebGL resources owned by this texture. * If [[RenderTexture.isOwned]] is true, then whatever object claims ownership of the texture is responsible for disposing of it when it is no longer needed. * Otherwise, the [RenderSystem]($frontend) will handle its disposal. */ abstract dispose(): void; } /** @public */ export declare namespace RenderTexture { /** Enumerates the types of [[RenderTexture]]s. */ enum Type { /** An image applied to a surface, with support for mip-mapping and repeating. */ Normal = 0, /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */ Glyph = 1, /** A non-repeating image with no mip-maps, used for example for reality models. */ TileSection = 2, /** A three-dimensional texture used for rendering a skybox. */ SkyBox = 3, /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */ FilteredTileSection = 4, /** A thematic gradient image used for thematic display. */ ThematicGradient = 5 } /** Parameters used to construct a [[RenderTexture]]. */ class Params { /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element. * Textures created on the front-end generally have no key. */ readonly key?: string; /** Indicates the type of texture. */ readonly type: Type; /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately. * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed. */ readonly isOwned: boolean; constructor(key?: string, type?: Type, isOwned?: boolean); get isTileSection(): boolean; get isGlyph(): boolean; get isSkyBox(): boolean; /** Obtain a RenderTexture params object with default values. */ static readonly defaults: Params; } } //# sourceMappingURL=RenderTexture.d.ts.map