starling-framework
Version:
A fast, productive library for 2D cross-platform development.
752 lines • 138 kB
HTML
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Painter | starling-framework</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">starling-framework</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">starling</a>
</li>
<li>
<a href="../modules/starling.rendering.html">rendering</a>
</li>
<li>
<a href="starling.rendering.painter.html">Painter</a>
</li>
</ul>
<h1>Class Painter</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A class that orchestrates rendering of all Starling display objects.</p>
</div>
<p>A Starling instance contains exactly one 'Painter' instance that should be used for all
rendering purposes. Each frame, it is passed to the render methods of all rendered display
objects. To access it outside a render method, call <code>Starling.painter</code>.</p>
<p>The painter is responsible for drawing all display objects to the screen. At its
core, it is a wrapper for many Context3D methods, but that's not all: it also provides
a convenient state mechanism, supports masking and acts as __iddleman between display
objects and renderers.</p>
<p> <strong>The State Stack</strong></p>
<p>The most important concept of the Painter class is the state stack. A RenderState
stores a combination of settings that are currently used for rendering, e.g. the current
projection- and modelview-matrices and context-related settings. It can be accessed
and manipulated via the <code>state</code> property. Use the methods
<code>pushState</code> and <code>popState</code> to store a specific state and restore
it later. That makes it easy to write rendering code that doesn't have any side effects.</p>
<listing>
painter.pushState(); // save a copy of the current state on the stack
painter.state.renderTarget = renderTexture;
painter.state.transformModelviewMatrix(object.transformationMatrix);
painter.state.alpha = 0.5;
painter.prepareToDraw(); // apply all state settings at the render context
drawSomething(); // insert Stage3D rendering code here
painter.popState(); // restores previous state</listing>
<p> @see RenderState</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Painter</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-external">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#backbufferheight" class="tsd-kind-icon">back<wbr>Buffer<wbr>Height</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#backbufferscalefactor" class="tsd-kind-icon">back<wbr>Buffer<wbr>Scale<wbr>Factor</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#backbufferwidth" class="tsd-kind-icon">back<wbr>Buffer<wbr>Width</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#cacheenabled" class="tsd-kind-icon">cache<wbr>Enabled</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#context" class="tsd-kind-icon">context</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#contextvalid" class="tsd-kind-icon">context<wbr>Valid</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#drawcount" class="tsd-kind-icon">draw<wbr>Count</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#enableerrorchecking" class="tsd-kind-icon">enable<wbr>Error<wbr>Checking</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#frameid" class="tsd-kind-icon">frameID</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#pixelsize" class="tsd-kind-icon">pixel<wbr>Size</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#profile" class="tsd-kind-icon">profile</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#programs" class="tsd-kind-icon">programs</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#sharecontext" class="tsd-kind-icon">share<wbr>Context</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#shareddata" class="tsd-kind-icon">shared<wbr>Data</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#stage3d" class="tsd-kind-icon">stage3D</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#state" class="tsd-kind-icon">state</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#stencilreferencevalue" class="tsd-kind-icon">stencil<wbr>Reference<wbr>Value</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="starling.rendering.painter.html#default_stencil_value" class="tsd-kind-icon">DEFAULT_<wbr>STENCIL_<wbr>VALUE</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-external">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#batchmesh" class="tsd-kind-icon">batch<wbr>Mesh</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#clear" class="tsd-kind-icon">clear</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#configurebackbuffer" class="tsd-kind-icon">configure<wbr>Back<wbr>Buffer</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#deleteprogram" class="tsd-kind-icon">delete<wbr>Program</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#dispose" class="tsd-kind-icon">dispose</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#drawfromcache" class="tsd-kind-icon">draw<wbr>From<wbr>Cache</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#drawmask" class="tsd-kind-icon">draw<wbr>Mask</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#enablebatchtrimming" class="tsd-kind-icon">enable<wbr>Batch<wbr>Trimming</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#erasemask" class="tsd-kind-icon">erase<wbr>Mask</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#excludefromcache" class="tsd-kind-icon">exclude<wbr>From<wbr>Cache</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#filltoken" class="tsd-kind-icon">fill<wbr>Token</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#finishframe" class="tsd-kind-icon">finish<wbr>Frame</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#finishmeshbatch" class="tsd-kind-icon">finish<wbr>Mesh<wbr>Batch</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#getprogram" class="tsd-kind-icon">get<wbr>Program</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_backbufferheight" class="tsd-kind-icon">get_<wbr>back<wbr>Buffer<wbr>Height</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_backbufferscalefactor" class="tsd-kind-icon">get_<wbr>back<wbr>Buffer<wbr>Scale<wbr>Factor</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_backbufferwidth" class="tsd-kind-icon">get_<wbr>back<wbr>Buffer<wbr>Width</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_cacheenabled" class="tsd-kind-icon">get_<wbr>cache<wbr>Enabled</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_context" class="tsd-kind-icon">get_<wbr>context</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_contextvalid" class="tsd-kind-icon">get_<wbr>context<wbr>Valid</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_drawcount" class="tsd-kind-icon">get_<wbr>draw<wbr>Count</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_enableerrorchecking" class="tsd-kind-icon">get_<wbr>enable<wbr>Error<wbr>Checking</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_frameid" class="tsd-kind-icon">get_<wbr>frameID</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_pixelsize" class="tsd-kind-icon">get_<wbr>pixel<wbr>Size</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_profile" class="tsd-kind-icon">get_<wbr>profile</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_programs" class="tsd-kind-icon">get_<wbr>programs</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_sharecontext" class="tsd-kind-icon">get_<wbr>share<wbr>Context</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_shareddata" class="tsd-kind-icon">get_<wbr>shared<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_stage3d" class="tsd-kind-icon">get_<wbr>stage3D</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_state" class="tsd-kind-icon">get_<wbr>state</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#get_stencilreferencevalue" class="tsd-kind-icon">get_<wbr>stencil<wbr>Reference<wbr>Value</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#hasprogram" class="tsd-kind-icon">has<wbr>Program</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#nextframe" class="tsd-kind-icon">next<wbr>Frame</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#popstate" class="tsd-kind-icon">pop<wbr>State</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#preparetodraw" class="tsd-kind-icon">prepare<wbr>ToDraw</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#present" class="tsd-kind-icon">present</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#pushstate" class="tsd-kind-icon">push<wbr>State</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#refreshbackbuffersize" class="tsd-kind-icon">refresh<wbr>Back<wbr>Buffer<wbr>Size</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#registerprogram" class="tsd-kind-icon">register<wbr>Program</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#requestcontext3d" class="tsd-kind-icon">request<wbr>Context3D</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#restorestate" class="tsd-kind-icon">restore<wbr>State</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#setstateto" class="tsd-kind-icon">set<wbr>State<wbr>To</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_cacheenabled" class="tsd-kind-icon">set_<wbr>cache<wbr>Enabled</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_drawcount" class="tsd-kind-icon">set_<wbr>draw<wbr>Count</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_enableerrorchecking" class="tsd-kind-icon">set_<wbr>enable<wbr>Error<wbr>Checking</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_frameid" class="tsd-kind-icon">set_<wbr>frameID</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_pixelsize" class="tsd-kind-icon">set_<wbr>pixel<wbr>Size</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_sharecontext" class="tsd-kind-icon">set_<wbr>share<wbr>Context</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.rendering.painter.html#set_stencilreferencevalue" class="tsd-kind-icon">set_<wbr>stencil<wbr>Reference<wbr>Value</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.rendering.painter.html#setupcontextdefaults" class="tsd-kind-icon">setup<wbr>Context<wbr>Defaults</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">new <wbr>Painter<span class="tsd-signature-symbol">(</span>stage3D<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Stage3D</span>, sharedContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.rendering.painter.html" class="tsd-signature-type">Painter</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L63">lib/starling/rendering/Painter.d.ts:63</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Creates a new Painter object. Normally, it's not necessary to create any custom
painters; instead, use the global painter found on the Starling instance.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>stage3D: <span class="tsd-signature-type">Stage3D</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> sharedContext: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="starling.rendering.painter.html" class="tsd-signature-type">Painter</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="backbufferheight" class="tsd-anchor"></a>
<h3>back<wbr>Buffer<wbr>Height</h3>
<div class="tsd-signature tsd-kind-icon">back<wbr>Buffer<wbr>Height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L352">lib/starling/rendering/Painter.d.ts:352</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the current height of the back buffer. In most cases, this value is in pixels;
however, if the app is running on an HiDPI display with an activated
'supportHighResolutions' setting, you have to multiply with 'backBufferPixelsPerPoint'
for the actual pixel count. Alternatively, use the Context3D-property with the
same name: it will return the exact pixel values.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="backbufferscalefactor" class="tsd-anchor"></a>
<h3>back<wbr>Buffer<wbr>Scale<wbr>Factor</h3>
<div class="tsd-signature tsd-kind-icon">back<wbr>Buffer<wbr>Scale<wbr>Factor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L358">lib/starling/rendering/Painter.d.ts:358</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The number of pixels per point returned by the 'backBufferWidth/Height' properties.
Except for desktop HiDPI displays with an activated 'supportHighResolutions' setting,
this will always return '1'.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="backbufferwidth" class="tsd-anchor"></a>
<h3>back<wbr>Buffer<wbr>Width</h3>
<div class="tsd-signature tsd-kind-icon">back<wbr>Buffer<wbr>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L344">lib/starling/rendering/Painter.d.ts:344</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the current width of the back buffer. In most cases, this value is in pixels;
however, if the app is running on an HiDPI display with an activated
'supportHighResolutions' setting, you have to multiply with 'backBufferPixelsPerPoint'
for the actual pixel count. Alternatively, use the Context3D-property with the
same name: it will return the exact pixel values.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="cacheenabled" class="tsd-anchor"></a>
<h3>cache<wbr>Enabled</h3>
<div class="tsd-signature tsd-kind-icon">cache<wbr>Enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L292">lib/starling/rendering/Painter.d.ts:292</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Indicates if the render cache is enabled. Normally, this should be left at the default;
however, some custom rendering logic might require to change this property temporarily.
Also note that the cache is automatically reactivated each frame, right before the
render process.</p>
</div>
<p> @default true</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="context" class="tsd-anchor"></a>
<h3>context</h3>
<div class="tsd-signature tsd-kind-icon">context<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Context3D</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L312">lib/starling/rendering/Painter.d.ts:312</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The Context3D instance this painter renders into.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="contextvalid" class="tsd-anchor"></a>
<h3>context<wbr>Valid</h3>
<div class="tsd-signature tsd-kind-icon">context<wbr>Valid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L363">lib/starling/rendering/Painter.d.ts:363</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Indicates if the Context3D object is currently valid (i.e. it hasn't been lost or
disposed).</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="drawcount" class="tsd-anchor"></a>
<h3>draw<wbr>Count</h3>
<div class="tsd-signature tsd-kind-icon">draw<wbr>Count<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L272">lib/starling/rendering/Painter.d.ts:272</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Indicates the number of stage3D draw calls.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="enableerrorchecking" class="tsd-anchor"></a>
<h3>enable<wbr>Error<wbr>Checking</h3>
<div class="tsd-signature tsd-kind-icon">enable<wbr>Error<wbr>Checking<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L335">lib/starling/rendering/Painter.d.ts:335</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Indicates if Stage3D render methods will report errors. Activate only when needed,
as this has a negative impact on performance. @default false</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="frameid" class="tsd-anchor"></a>
<h3>frameID</h3>
<div class="tsd-signature tsd-kind-icon">frameID<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L318">lib/starling/rendering/Painter.d.ts:318</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the index of the current frame <strong>if</strong> the render cache is enabled;
otherwise, returns zero. To get the frameID regardless of the render cache, call
<code>Starling.frameID</code> instead.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="pixelsize" class="tsd-anchor"></a>
<h3>pixel<wbr>Size</h3>
<div class="tsd-signature tsd-kind-icon">pixel<wbr>Size<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L323">lib/starling/rendering/Painter.d.ts:323</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The size (in points) that represents one pixel in the back buffer.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="profile" class="tsd-anchor"></a>
<h3>profile</h3>
<div class="tsd-signature tsd-kind-icon">profile<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L368">lib/starling/rendering/Painter.d.ts:368</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The Context3D profile of the current render context, or <code>null</code>
if the context has not been created yet.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected tsd-is-external">
<a name="programs" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> programs</h3>
<div class="tsd-signature tsd-kind-icon">programs<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="starling.rendering.program.html" class="tsd-signature-type">Program</a><span class="tsd-signature-symbol">></span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L378">lib/starling/rendering/Painter.d.ts:378</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="sharecontext" class="tsd-anchor"></a>
<h3>share<wbr>Context</h3>
<div class="tsd-signature tsd-kind-icon">share<wbr>Context<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L329">lib/starling/rendering/Painter.d.ts:329</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Indicates if another Starling instance (or another Stage3D framework altogether)
uses the same render context. @default false</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="shareddata" class="tsd-anchor"></a>
<h3>shared<wbr>Data</h3>
<div class="tsd-signature tsd-kind-icon">shared<wbr>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L375">lib/starling/rendering/Painter.d.ts:375</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A dictionary that can be used to save custom data related to the render context.
If you need to share data that is bound to the render context (e.g. textures), use
this dictionary instead of creating a static class variable. That way, the data will
be available for all Starling instances that use this stage3D / context.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="stage3d" class="tsd-anchor"></a>
<h3>stage3D</h3>
<div class="tsd-signature tsd-kind-icon">stage3D<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Stage3D</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L308">lib/starling/rendering/Painter.d.ts:308</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The Stage3D instance this painter renders into.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="state" class="tsd-anchor"></a>
<h3>state</h3>
<div class="tsd-signature tsd-kind-icon">state<span class="tsd-signature-symbol">:</span> <a href="starling.rendering.renderstate.html" class="tsd-signature-type">RenderState</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L304">lib/starling/rendering/Painter.d.ts:304</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The current render state, containing some of the context settings, projection- and
modelview-matrix, etc. Always returns the same instance, even after calls to "pushState"
and "popState".</p>
</div>
<p>When you change the current RenderState, and this change is not compatible with
the current render batch, the batch will be concluded right away. Thus, watch out
for changes of blend mode, clipping rectangle, render target or culling.</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="stencilreferencevalue" class="tsd-anchor"></a>
<h3>stencil<wbr>Reference<wbr>Value</h3>
<div class="tsd-signature tsd-kind-icon">stencil<wbr>Reference<wbr>Value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L281">lib/starling/rendering/Painter.d.ts:281</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The current stencil reference value of the active render target. This value
is typically incremented when drawing a mask and decrementing when erasing it.
The painter keeps track of one stencil reference value per render target.
Only change this value if you know what you're doing!</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
<a name="default_stencil_value" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> DEFAULT_<wbr>STENCIL_<wbr>VALUE</h3>
<div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>STENCIL_<wbr>VALUE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L63">lib/starling/rendering/Painter.d.ts:63</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The value with which the stencil buffer will be cleared,
and the default reference value used for stencil tests.</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="batchmesh" class="tsd-anchor"></a>
<h3>batch<wbr>Mesh</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">batch<wbr>Mesh<span class="tsd-signature-symbol">(</span>mesh<span class="tsd-signature-symbol">: </span><a href="starling.display.mesh.html" class="tsd-signature-type">Mesh</a>, subset<span class="tsd-signature-symbol">?: </span><a href="starling.utils.meshsubset.html" class="tsd-signature-type">MeshSubset</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L205">lib/starling/rendering/Painter.d.ts:205</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Adds a mesh to the current batch of unrendered meshes. If the current batch is not
compatible with the mesh, all previous meshes are rendered at once and the batch
is cleared.</p>
</div>
<p> @param mesh The mesh to batch.
@param subset The range of vertices to be batched. If <code>null</code>, the complete
mesh will be used.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>mesh: <a href="starling.display.mesh.html" class="tsd-signature-type">Mesh</a></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> subset: <a href="starling.utils.meshsubset.html" class="tsd-signature-type">MeshSubset</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="clear" class="tsd-anchor"></a>
<h3>clear</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">clear<span class="tsd-signature-symbol">(</span>rgb<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, alpha<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L257">lib/starling/rendering/Painter.d.ts:257</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Clears the render context with a certain color and alpha value. Since this also
clears the stencil buffer, the stencil reference value is also reset to '0'.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> rgb: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> alpha: <span class="tsd-signature-type">number</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="configurebackbuffer" class="tsd-anchor"></a>
<h3>configure<wbr>Back<wbr>Buffer</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">configure<wbr>Back<wbr>Buffer<span class="tsd-signature-symbol">(</span>viewPort<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Rectangle</span>, contentScaleFactor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, antiAlias<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, enableDepthAndStencil<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, supportBrowserZoom<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L107">lib/starling/rendering/Painter.d.ts:107</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sets the viewport dimensions and other attributes of the rendering buffer.
Starling will call this method internally, so most apps won't need to mess with this.</p>
</div>
<p>Beware: if <code>shareContext</code> is enabled, the method will only update the
painter's context-related information (like the size of the back buffer), but won't
make any actual changes to the context.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>viewPort: <span class="tsd-signature-type">Rectangle</span></h5>
<div class="tsd-comment tsd-typography">
<p>the position and size of the area that should be rendered
into, in pixels.</p>
</div>
</li>
<li>
<h5>contentScaleFactor: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>only relevant for Desktop (!) HiDPI screens. If you want
to support high resolutions, pass the 'contentScaleFactor'
of the Flash stage; otherwise, '1.0'.</p>
</div>
</li>
<li>
<h5>antiAlias: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>from 0 (none) to 16 (very high quality).</p>
</div>
</li>
<li>
<h5>enableDepthAndStencil: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography">
<p>indicates whether the depth and stencil buffers should
be enabled. Note that on AIR, you also have to enable
this setting in the app-xml (application descriptor);
otherwise, this setting will be silently ignored.</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> supportBrowserZoom: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography">
<p>if enabled, zooming a website will adapt the size of
the back buffer.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="deleteprogram" class="tsd-anchor"></a>
<h3>delete<wbr>Program</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">delete<wbr>Program<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L118">lib/starling/rendering/Painter.d.ts:118</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Deletes the program of a certain name.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>name: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="dispose" class="tsd-anchor"></a>
<h3>dispose</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">dispose<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L73">lib/starling/rendering/Painter.d.ts:73</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Disposes all mesh batches, programs, and - if it is not being shared -
the render context.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="drawfromcache" class="tsd-anchor"></a>
<h3>draw<wbr>From<wbr>Cache</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">draw<wbr>From<wbr>Cache<span class="tsd-signature-symbol">(</span>startToken<span class="tsd-signature-symbol">: </span><a href="starling.rendering.batchtoken.html" class="tsd-signature-type">BatchToken</a>, endToken<span class="tsd-signature-symbol">: </span><a href="starling.rendering.batchtoken.html" class="tsd-signature-type">BatchToken</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/rendering/Painter.d.ts#L235">lib/starling/rendering/Painter.d.ts:235</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Draws all meshes from the render cache between <code>startToken</code> and
(but not including) <code>endToken</code>. The render cache contains all meshes
rendered in the previous frame.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>startToken: <a href="starling.rendering.batchtoken.html" class="tsd-signature-type">BatchToken</a></h5>
</li>
<li>
<h5>endToken: <a href="starling.rendering.batchtoken.html" class="tsd-signature-type">BatchToken</a></h5>
</li>
</ul>
<h4 class=