@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.
31 lines (30 loc) • 1.64 kB
TypeScript
import { type Nullable } from "../types.js";
import { type GeometryBufferRenderer, type IGeometryBufferTextureTypeAndFormat } from "./geometryBufferRenderer.js";
declare module "../scene.pure.js" {
interface Scene {
/** @internal (Backing field) */
_geometryBufferRenderer: Nullable<GeometryBufferRenderer>;
/**
* Gets or Sets the current geometry buffer associated to the scene.
*/
geometryBufferRenderer: Nullable<GeometryBufferRenderer>;
/**
* Enables a GeometryBufferRender and associates it with the scene
* @param ratioOrDimensions defines the scaling ratio to apply to the renderer (1 by default which means same resolution). You can also directly pass a width and height for the generated textures
* @param depthFormat Format of the depth texture (default: Constants.TEXTUREFORMAT_DEPTH16)
* @param textureTypesAndFormats The types, formats and optional sampling modes of textures to create as render targets.
* If not provided, all textures will be RGBA and float or half float, depending on the engine capabilities.
* @returns the GeometryBufferRenderer
*/
enableGeometryBufferRenderer(ratioOrDimensions?: number | {
width: number;
height: number;
}, depthFormat?: number, textureTypesAndFormats?: {
[key: number]: IGeometryBufferTextureTypeAndFormat;
}): Nullable<GeometryBufferRenderer>;
/**
* Disables the GeometryBufferRender associated with the scene
*/
disableGeometryBufferRenderer(): void;
}
}