@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
36 lines (35 loc) • 2.11 kB
TypeScript
import { InternalTexture } from "../../Materials/Textures/internalTexture.js";
import type { RenderTargetCreationOptions, DepthTextureCreationOptions, TextureSize } from "../../Materials/Textures/textureCreationOptions.js";
import type { Nullable } from "../../types.js";
import type { RenderTargetWrapper } from "../renderTargetWrapper.js";
import "../AbstractEngine/abstractEngine.texture.js";
/**
* Type used to define a texture size (either with a number or with a rect width and height)
* @deprecated please use TextureSize instead
*/
export type RenderTargetTextureSize = TextureSize;
declare module "../../Engines/abstractEngine.js" {
interface AbstractEngine {
/**
* Creates a new render target texture
* @param size defines the size of the texture
* @param options defines the options used to create the texture
* @returns a new render target wrapper ready to render texture
*/
createRenderTargetTexture(size: TextureSize, options: boolean | RenderTargetCreationOptions): RenderTargetWrapper;
/**
* Updates the sample count of a render target texture
* @see https://doc.babylonjs.com/setup/support/webGL2#multisample-render-targets
* @param rtWrapper defines the render target wrapper to update
* @param samples defines the sample count to set
* @returns the effective sample count (could be 0 if multisample render targets are not supported)
*/
updateRenderTargetTextureSampleCount(rtWrapper: Nullable<RenderTargetWrapper>, samples: number): number;
/** @internal */
_createDepthStencilTexture(size: TextureSize, options: DepthTextureCreationOptions, rtWrapper: RenderTargetWrapper): InternalTexture;
/** @internal */
_createHardwareRenderTargetWrapper(isMulti: boolean, isCube: boolean, size: TextureSize): RenderTargetWrapper;
/** @internal */
_setupDepthStencilTexture(internalTexture: InternalTexture, size: TextureSize, bilinearFiltering: boolean, comparisonFunction: number, samples?: number): void;
}
}