require(["esri/views/3d/webgl/ManagedFBO"], (ManagedFBO) => { /* code goes here */ });
import ManagedFBO from "@arcgis/core/views/3d/webgl/ManagedFBO.js";
esri/views/3d/webgl/ManagedFBO
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.
- 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
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
acquireColor(attachment){ManagedFBO}
-
Acquire and attach a new color texture to this framebuffer.
The attached texture has a gl.PixelFormat.RGBA pixel format.
Parameterattachment ColorAttachmentthe WebGL color attachment point for the texture
ReturnsType Description ManagedFBO
-
acquireDepth
acquireDepth(){ManagedFBO}
-
Acquire and attach a new depth buffer to this framebuffer. The attached texture has a gl.PixelFormat.DEPTH_STENCIL pixel format.
ReturnsType Description ManagedFBO
-
attachColor
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.
Parameterscolor ManagedColorAttachmentthe color texture to attach.
attachment ColorAttachmentthe gl.ColorFormat attachment point.
ReturnsType Description ManagedFBO
-
attachDepth
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.
Parameterdepth ManagedDepthAttachmentthe depth buffer texture to attach.
ReturnsType Description ManagedFBO
-
getAttachment
getAttachment(attachment){ManagedColorAttachment |ManagedDepthAttachment}
-
Returns a managed color attachment linked to this framebuffer object.
Parameterattachment ColorAttachment|DepthAttachmentoptionalthe WebGL color attachment point.
ReturnsType Description ManagedColorAttachment | ManagedDepthAttachment
-
getTexture
getTexture(attachment){FBOTexture}
-
Return the texture for a given color or depth attachment.
Parameterattachment ColorAttachment|DepthAttachmentoptionala WebGL color or depth attachment point.
ReturnsType Description FBOTexture
-
Release this managed framebuffer.
If more than one reference exists this will not have an effect.
-
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
ColorAttachment Object
-
Describes a color attachment point of WebGL2. Currently supported: COLOR_ATTACHMENT0 ... COLOR_ATTACHMENT15.
-
DepthAttachment
DepthAttachment Object
-
Describes a depth attachment point of WebGL2. Currently supported: DEPTH_STENCIL_ATTACHMENT.
-
ManagedColorAttachment
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 FunctionRelease this managed attachment. If more than one reference exists this will not have an effect.
-
ManagedDepthAttachment
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 FunctionRelease this managed attachment. If more than one reference exists this will not have an effect.