Table Of Contents

Previous topic

9.11. The RenderBuffer Object

Next topic

9.13. The OcclusionQuery Object

This Page

9.12. The RenderTarget Object

A RenderTarget object is collection of renderable objects, Textures or RenderBuffers, that can be set as a rendering target.

GraphicsDevice.maxSupported(“RENDERTARGET_COLOR_TEXTURES”) can be use to check the number of supported color textures.

9.12.1. Constructor

A RenderTarget object can be constructed with GraphicsDevice.createRenderTarget.

9.12.2. Methods

9.12.2.1. getWidth

Summary

Get the width of the current RenderTarget object.

Syntax

var width = renderTarget.getWidth();

9.12.2.2. getHeight

Summary

Get the height of the current RenderTarget object.

Syntax

var height = renderTarget.getHeight();

9.12.3. Properties

9.12.3.1. colorTexture0

Summary

The Texture object set as the target for color rendering at index 0.

Syntax

var mainColor = renderTarget.colorTexture0;

Note

Read Only

9.12.3.2. colorTexture1

Summary

The Texture object set as the target for color rendering at index 1.

Syntax

var color1 = renderTarget.colorTexture1;

Note

Read Only

9.12.3.3. colorTexture2

Summary

The Texture object set as the target for color rendering at index 2.

Syntax

var color2 = renderTarget.colorTexture2;

Note

Read Only

9.12.3.4. colorTexture3

Summary

The Texture object set as the target for color rendering at index 3.

Syntax

var color3 = renderTarget.colorTexture3;

Note

Read Only

9.12.3.5. depthBuffer

Summary

The RenderBuffer object set as the target for depth rendering.

Syntax

var depthBuffer = renderTarget.depthBuffer;

Note

Read Only

9.12.3.6. depthTexture

Summary

The Texture object set as the target for depth rendering.

Syntax

var depthTexture = renderTarget.depthTexture;

Note

Read Only

9.12.3.7. face

Summary

The index of the destination face when using cubemaps as rendering targets.

Syntax

var faceIndex = renderTarget.face;

Note

Read Only