ManagedFBO

AMD: require(["esri/views/3d/webgl/ManagedFBO"], (ManagedFBO) => { /* code goes here */ });
ESM: import ManagedFBO from "@arcgis/core/views/3d/webgl/ManagedFBO.js";
Object: esri/views/3d/webgl/ManagedFBO
Since: ArcGIS Maps SDK for JavaScript 4.29

ManagedFBO is an interface to represent a framebuffer object resource of the SceneView. ManagedFBO are used in custom RenderNodes to access current render states of the frame as well as return modified frame states to the render pipeline.

Important guidelines

This interface is experimental. Please read the following information carefully before using it in a product:

  • It is not possible to shield users of this interface from SceneView internal implementation details. Therefore, this interface should be considered not stable and subject to changes in upcoming minor releases of the ArcGIS Maps SDK for JavaScript.
  • Because of the complex nature of WebGL and hardware-accelerated 3D rendering, this interface is targeting expert developers that are experienced with WebGL or OpenGL.
    • Improper use of WebGL might not only break the custom rendering, but also the rendering of SceneView itself.
    • Esri does not provide any support for issues related to WebGL rendering in custom rendering code, or for issues that arise in SceneView rendering while using custom rendering code.
  • Integration with third-party libraries is only possible under certain conditions. Specifically, the third-party library has to be capable of working on the same WebGL context as SceneView, and able to set the relevant parts of the WebGL state in every frame.

Property Overview

Name Type Summary Object

The name of the managed fbo target

ManagedFBO

Property Details

name

Property
name RenderNodeInputreadonly

The name of the managed fbo target

Method Overview

Name Return Type Summary Object

Acquire and attach a new color texture to this framebuffer.

ManagedFBO

Acquire and attach a new depth buffer to this framebuffer.

ManagedFBO

Attach a color buffer texture to this framebuffer.

ManagedFBO

Attach a depth buffer texture to this framebuffer.

ManagedFBO

Returns a managed color attachment linked to this framebuffer object.

ManagedFBO

Return the texture for a given color or depth attachment.

ManagedFBO

Release this managed framebuffer.

ManagedFBO

Increase reference counting on this managed framebuffer.

ManagedFBO

Method Details

acquireColor

Method
acquireColor(attachment){ManagedFBO}

Acquire and attach a new color texture to this framebuffer.

The attached texture has a gl.PixelFormat.RGBA pixel format.

Parameter
attachment ColorAttachment

the WebGL color attachment point for the texture

Returns
Type Description
ManagedFBO

acquireDepth

Method
acquireDepth(){ManagedFBO}

Acquire and attach a new depth buffer to this framebuffer. The attached texture has a gl.PixelFormat.DEPTH_STENCIL pixel format.

Returns
Type Description
ManagedFBO

attachColor

Method
attachColor(color, attachment){ManagedFBO}

Attach a color buffer texture to this framebuffer.

A previously attached color texture at the given attachment point will be released. The newly attached texture will be retained. This function automatically binds the framebuffer of this ManagedFBO.

Parameters

the color texture to attach.

attachment ColorAttachment

the gl.ColorFormat attachment point.

Returns
Type Description
ManagedFBO

attachDepth

Method
attachDepth(depth){ManagedFBO}

Attach a depth buffer texture to this framebuffer. This function will automatically bind the framebuffer of this ManagedFBO if necessary.

A previously attached depth texture will be released. The newly attached texture will be retained. This function automatically binds the framebuffer of this ManagedFBO.

Parameter

the depth buffer texture to attach.

Returns
Type Description
ManagedFBO

getAttachment

Method
getAttachment(attachment){ManagedColorAttachment |ManagedDepthAttachment}

Returns a managed color attachment linked to this framebuffer object.

Parameter
optional

the WebGL color attachment point.

Returns

getTexture

Method
getTexture(attachment){FBOTexture}

Return the texture for a given color or depth attachment.

Parameter
optional

a WebGL color or depth attachment point.

Returns
Type Description
FBOTexture

release

Method
release()

Release this managed framebuffer.

If more than one reference exists this will not have an effect.

retain

Method
retain()

Increase reference counting on this managed framebuffer.

You can use this functionality to hold framebuffer contents for several frames and then release the framebuffer.

Type Definitions

ColorAttachment

Type Definition
ColorAttachment Object

Describes a color attachment point of WebGL2. Currently supported: COLOR_ATTACHMENT0 ... COLOR_ATTACHMENT15.

DepthAttachment

Type Definition
DepthAttachment Object

Describes a depth attachment point of WebGL2. Currently supported: DEPTH_STENCIL_ATTACHMENT.

FBOTexture

Type Definition
FBOTexture Object

Encapsulates a WebGL texture.

Property
glName String

the WebGL name content.

ManagedColorAttachment

Type Definition
ManagedColorAttachment Object

Describes a single attachment of a managed framebuffer. A managed color attachment is also memory managed by the SceneView.

Properties
retain Function

Increase reference counting on this managed attachment. You can use this functionality to hold the attachment temporarily or relink attachments to new managed framebuffers.

release Function

Release this managed attachment. If more than one reference exists this will not have an effect.

ManagedDepthAttachment

Type Definition
ManagedDepthAttachment Object

Describes the depth attachment of a managed framebuffer. The depth attachment is memory managed by the SceneView.

Properties
retain Function

Increase reference counting on this managed attachment. You can use this functionality to hold the attachment temporarily or relink attachments to new managed framebuffers.

release Function

Release this managed attachment. If more than one reference exists this will not have an effect.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.