<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Starling Forum &#187; Tag: draw - Recent Posts</title>
		<link>http://forum.starling-framework.org/tags/draw</link>
		<description>The Starling Framework Community</description>
		<language>en-US</language>
		<pubDate>Mon, 20 May 2013 07:06:57 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forum.starling-framework.org/search.php</link>
		</textInput>
		<atom:link href="http://forum.starling-framework.org/rss/tags/draw" rel="self" type="application/rss+xml" />

		<item>
			<title>tiagokeller on "Bitmap Rendering"</title>
			<link>http://forum.starling-framework.org/topic/bitmap-rendering#post-32035</link>
			<pubDate>Mon, 06 May 2013 01:01:23 +0000</pubDate>
			<dc:creator>tiagokeller</dc:creator>
			<guid isPermaLink="false">32035@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;+1
&#60;/p&#62;</description>
		</item>
		<item>
			<title>62316e on "Bitmap Rendering"</title>
			<link>http://forum.starling-framework.org/topic/bitmap-rendering#post-30737</link>
			<pubDate>Sat, 20 Apr 2013 21:44:34 +0000</pubDate>
			<dc:creator>62316e</dc:creator>
			<guid isPermaLink="false">30737@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Be careful! drawToBitmapData is not working on devices  &#38;lt;img src=&#38;quot;http://forum.starling-framework.org/my-plugins/bb-smilies/default/icon_sad.gif&#38;quot; title=&#38;quot;:(&#38;quot; class=&#38;quot;bb_smilies&#38;quot; /&#38;gt; 
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh Tynjala on "Independant QuadBatches with same texture -&#62; Many Draws?"</title>
			<link>http://forum.starling-framework.org/topic/independant-quadbatches-with-same-texture-many-draws#post-29373</link>
			<pubDate>Tue, 09 Apr 2013 01:29:20 +0000</pubDate>
			<dc:creator>Josh Tynjala</dc:creator>
			<guid isPermaLink="false">29373@http://forum.starling-framework.org/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;most of the time a quadbatch is better&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;That's not necessarily true. A QuadBatch that replaces a number* of Images can be better, but it also depends on what else is on screen. If the GPU is overloaded by something else, a QuadBatch may end up hurting things more. I've heard from people who understand GPUs better than me that the &#34;fill rate&#34; has a much bigger impact on performance than the number of draw calls.&#60;/p&#62;
&#60;p&#62;*What number? I don't know. There aren't magic numbers that just work for everyone because all content is different. You need to experiment with stuff and figure out what's best for your specific game. In my Scale9Image class, a QuadBatch is often better than nine separate images. A QuadBatch is also often better for text displayed with bitmap fonts, since each character is a separate image. I've had users report that turning off batching helps in some cases. Maybe for newer devices with more powerful CPUs that can handle the overhead of AS3 better or for desktops with MUCH more powerful CPUs.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Krum on "Independant QuadBatches with same texture -&#62; Many Draws?"</title>
			<link>http://forum.starling-framework.org/topic/independant-quadbatches-with-same-texture-many-draws#post-29372</link>
			<pubDate>Tue, 09 Apr 2013 01:19:22 +0000</pubDate>
			<dc:creator>Krum</dc:creator>
			<guid isPermaLink="false">29372@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Perfect, thanks guys!&#60;/p&#62;
&#60;p&#62;If I find anything substantial with my tests ill update, otherwise thanks a ton for the info!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>polarathene on "Independant QuadBatches with same texture -&#62; Many Draws?"</title>
			<link>http://forum.starling-framework.org/topic/independant-quadbatches-with-same-texture-many-draws#post-29370</link>
			<pubDate>Tue, 09 Apr 2013 01:00:06 +0000</pubDate>
			<dc:creator>polarathene</dc:creator>
			<guid isPermaLink="false">29370@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;I think it really depends on what else is happening in your game. The quadbatches are going to add the draw calls having more performance cost on the gpu but that in turn impacts the cpu less allowing it to handle anything non gpu related like physics? &#60;/p&#62;
&#60;p&#62;From what I understand, the older devices usually perform far better via the gpu than cpu, hence why you're using starling in the first place. So those extra draw calls might not be all that bad, everyone new to working with the gpu is obsessive with trying to keep the draw calls low but Josh numerous times replies that most of the time a quadbatch is better. Only way you're going to know is by testing your app/game as you go and if you start seeing a performance hit than optimize. It's hard when you want to optimize for devices you can't test. 3GS is fairly popular target though, might have luck with google  &#38;lt;img src=&#38;quot;http://forum.starling-framework.org/my-plugins/bb-smilies/default/icon_smile.gif&#38;quot; title=&#38;quot;:)&#38;quot; class=&#38;quot;bb_smilies&#38;quot; /&#38;gt; 
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Krum on "Independant QuadBatches with same texture -&#62; Many Draws?"</title>
			<link>http://forum.starling-framework.org/topic/independant-quadbatches-with-same-texture-many-draws#post-29367</link>
			<pubDate>Tue, 09 Apr 2013 00:33:39 +0000</pubDate>
			<dc:creator>Krum</dc:creator>
			<guid isPermaLink="false">29367@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Thanks. I remember reading somewhere that games should remain under 20 draw calls. Im halfway there and its only a base prototype with a small percentage of the gameplay elements.&#60;/p&#62;
&#60;p&#62;To be clear on this... If the Cpu manage the image data while the gpu completely handles the draws and rendering, then as you say, changing many Images into just 1 Image with many draws will lessen Cpu load while not effecting the Gpu as heavily?&#60;/p&#62;
&#60;p&#62;If so great! Does anyone know a good amount of draws used for a starling game that will decently run on 3GS? Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh Tynjala on "Independant QuadBatches with same texture -&#62; Many Draws?"</title>
			<link>http://forum.starling-framework.org/topic/independant-quadbatches-with-same-texture-many-draws#post-29365</link>
			<pubDate>Tue, 09 Apr 2013 00:09:58 +0000</pubDate>
			<dc:creator>Josh Tynjala</dc:creator>
			<guid isPermaLink="false">29365@http://forum.starling-framework.org/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;each Quadbatch uses it's own draw call!&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes, that's how QuadBatches work.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Is there a way to have multiple QuadBatches with the same texture use only 1 draw call?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;No.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;an additional 5-6 draw calls!
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;That's barely any. Apps that display a lot of text typically have many more. I wouldn't worry too much about it.&#60;/p&#62;
&#60;p&#62;Draw calls aren't always bad. Sometimes, they can even improve performance because they help ease pressure on the CPU.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Krum on "Independant QuadBatches with same texture -&#62; Many Draws?"</title>
			<link>http://forum.starling-framework.org/topic/independant-quadbatches-with-same-texture-many-draws#post-29357</link>
			<pubDate>Mon, 08 Apr 2013 22:51:03 +0000</pubDate>
			<dc:creator>Krum</dc:creator>
			<guid isPermaLink="false">29357@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;So my game has a few large buildings that are generated using Quadbatches. They all use the same spritesheet, but each Quadbatch uses it's own draw call! The buildings need to move seperately, but having multiple QuadBatches skyrockets my draws from 5 to 11...&#60;/p&#62;
&#60;p&#62;At this point I'm not sure if it's better to have buildings made of many different images and only 1 draw call, or use QuadBatches but then have to have an additional 5-6 draw calls!&#60;/p&#62;
&#60;p&#62;Question:&#60;br /&#62;
Is there a way to have multiple QuadBatches with the same texture use only 1 draw call?&#60;br /&#62;
Note: I can't batch them into 1 giant QuadBatch because they need to have independant movement.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jacobholm on "Advice on render order, want menu to be on top"</title>
			<link>http://forum.starling-framework.org/topic/advice-on-render-order-want-menu-to-be-on-top#post-27278</link>
			<pubDate>Mon, 18 Mar 2013 09:28:07 +0000</pubDate>
			<dc:creator>jacobholm</dc:creator>
			<guid isPermaLink="false">27278@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Great, thank you very much!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Artemix on "Advice on render order, want menu to be on top"</title>
			<link>http://forum.starling-framework.org/topic/advice-on-render-order-want-menu-to-be-on-top#post-27266</link>
			<pubDate>Sun, 17 Mar 2013 23:47:12 +0000</pubDate>
			<dc:creator>Artemix</dc:creator>
			<guid isPermaLink="false">27266@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;You can (should) have a view manager, and a main container for each view. One view would be your menu, another one your ingame, and so on.&#60;/p&#62;
&#60;p&#62;That way, you only dispose of the childs of the main containers, but never the containers themselves, ergo, the draw order keeps intact.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jacobholm on "Advice on render order, want menu to be on top"</title>
			<link>http://forum.starling-framework.org/topic/advice-on-render-order-want-menu-to-be-on-top#post-27265</link>
			<pubDate>Sun, 17 Mar 2013 22:59:33 +0000</pubDate>
			<dc:creator>jacobholm</dc:creator>
			<guid isPermaLink="false">27265@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;as I understand it I currently have to keep track of the drawing order manually. When my game starts the menu is the last thing I pass to addChild() causing it to be drawn on the very top. After the game is over and I want to restart I have disposed of some objects and need to add them again. This causes them to render on top of the menu (since I do not remove and add it every time the game resets).&#60;/p&#62;
&#60;p&#62;I am sure there are others who have encountered this issue and have some advice? Perhaps I have missed something?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Pandan on "Bitmap Rendering"</title>
			<link>http://forum.starling-framework.org/topic/bitmap-rendering#post-27249</link>
			<pubDate>Sun, 17 Mar 2013 14:35:03 +0000</pubDate>
			<dc:creator>Pandan</dc:creator>
			<guid isPermaLink="false">27249@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;+1
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh Tynjala on "Layout getting called after draw?"</title>
			<link>http://forum.starling-framework.org/topic/layout-getting-called-after-draw#post-26816</link>
			<pubDate>Tue, 12 Mar 2013 23:27:37 +0000</pubDate>
			<dc:creator>Josh Tynjala</dc:creator>
			<guid isPermaLink="false">26816@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Well, maybe. If the parent moves, there's know way to detect that without checking every frame.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>whizzkid on "Layout getting called after draw?"</title>
			<link>http://forum.starling-framework.org/topic/layout-getting-called-after-draw#post-26806</link>
			<pubDate>Tue, 12 Mar 2013 23:08:03 +0000</pubDate>
			<dc:creator>whizzkid</dc:creator>
			<guid isPermaLink="false">26806@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Thanks, that works, although its only needed to update once after every layout, instead of every frame  &#38;lt;img src=&#38;quot;http://forum.starling-framework.org/my-plugins/bb-smilies/default/icon_razz.gif&#38;quot; title=&#38;quot;:P&#38;quot; class=&#38;quot;bb_smilies&#38;quot; /&#38;gt; 
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh Tynjala on "Layout getting called after draw?"</title>
			<link>http://forum.starling-framework.org/topic/layout-getting-called-after-draw#post-26640</link>
			<pubDate>Mon, 11 Mar 2013 18:48:36 +0000</pubDate>
			<dc:creator>Josh Tynjala</dc:creator>
			<guid isPermaLink="false">26640@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;When I need to position a native overlay to match the position of a Starling display object, I usually override the render() method and position it there.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>whizzkid on "Layout getting called after draw?"</title>
			<link>http://forum.starling-framework.org/topic/layout-getting-called-after-draw#post-26522</link>
			<pubDate>Sun, 10 Mar 2013 18:54:57 +0000</pubDate>
			<dc:creator>whizzkid</dc:creator>
			<guid isPermaLink="false">26522@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Hey all,&#60;/p&#62;
&#60;p&#62;I'm writing an app that uses the Camera. and I've tried the StarlingCamera that I found on the forum here, but thats too slow for me.&#60;/p&#62;
&#60;p&#62;Using a the standard flash camera in Starling.current.nativeOverlay does the trick for me. however I would like to  position it according to elements in my layout in feathers. &#60;/p&#62;
&#60;p&#62;So I've made a placeholder Quad and added it to my ScrollContainer which has a VerticalLayout set. This works fine and everything updates nicely when my deviceOrientation changes.&#60;/p&#62;
&#60;p&#62;Now my assumption was that I could position my camera view (Video) in the draw override of my screen. but unfortunately, the layout isn't done until AFTER the Draw.&#60;/p&#62;
&#60;p&#62;So, in my draw override, I always see the position data of the previous state.&#60;/p&#62;
&#60;p&#62;How can I properly do this? There's no Event I can watch to see when all the elements have been laid out, and creating a timer to update it 'somewhere after' the draw is really ugly imho  &#38;lt;img src=&#38;quot;http://forum.starling-framework.org/my-plugins/bb-smilies/default/icon_smile.gif&#38;quot; title=&#38;quot;:)&#38;quot; class=&#38;quot;bb_smilies&#38;quot; /&#38;gt; &#60;/p&#62;
&#60;p&#62;any help would be appreciated,&#60;/p&#62;
&#60;p&#62;regards,
&#60;/p&#62;</description>
		</item>
		<item>
			<title>XTender on "flatten cause more drawcalls"</title>
			<link>http://forum.starling-framework.org/topic/flatten-cause-more-drawcalls#post-25849</link>
			<pubDate>Tue, 05 Mar 2013 11:03:47 +0000</pubDate>
			<dc:creator>XTender</dc:creator>
			<guid isPermaLink="false">25849@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I've tryed to do some  performacne tweaking on my game by faltten some sprites which dont change, but after I've done it the drawcalls increased from ~21 to ~78.&#60;/p&#62;
&#60;p&#62;I would like to show my drawLayers with this small ASCII art.&#60;/p&#62;
&#60;p&#62;BACKGROUND (Sprite with 1 image) - Flattened - Texture from Embedded Asset&#60;br /&#62;
STREET (Sprite with ~20 Sprites which contains 1 image) - Unflattened - Atlas#1&#60;br /&#62;
Player (Sprite with 1 MovieClip and 1 Sprite) - Unflattened - Atlas#2&#60;br /&#62;
Obstacles (Sprites with 1 Image) - Flatten - Atlas#2&#60;br /&#62;
Items (Sprites with 1 Image) - Unflatten - Atlas#2&#60;br /&#62;
Some HUD stuff with Textfield (Unflatten)&#60;/p&#62;
&#60;p&#62;Maybe someone can give ma a clue  &#38;lt;img src=&#38;quot;http://forum.starling-framework.org/my-plugins/bb-smilies/default/icon_smile.gif&#38;quot; title=&#38;quot;:)&#38;quot; class=&#38;quot;bb_smilies&#38;quot; /&#38;gt; &#60;/p&#62;
&#60;p&#62;- Paul
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mirkin on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23132</link>
			<pubDate>Fri, 01 Feb 2013 01:26:05 +0000</pubDate>
			<dc:creator>mirkin</dc:creator>
			<guid isPermaLink="false">23132@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;I managed to get all 26 keys with 1 draw by removing flatten() from each key.&#60;br /&#62;
With flatten() I get a better frame rate but I get 26 draws.&#60;/p&#62;
&#60;p&#62;Comment out flatten() 1 draw for all 26 keys but a worse frame rate.&#60;/p&#62;
&#60;p&#62;So it seems all this time it was the flatten() increasing draws by a lot but also increasing performance.&#60;/p&#62;
&#60;p&#62;[Zambini by background I mean another texture used once as a full screen background for the App]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Zambini on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23130</link>
			<pubDate>Fri, 01 Feb 2013 01:04:54 +0000</pubDate>
			<dc:creator>Zambini</dc:creator>
			<guid isPermaLink="false">23130@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;What do you mean the background? The backgroundSkin and backgroundSkin_PRESS are from different atlases?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mirkin on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23129</link>
			<pubDate>Fri, 01 Feb 2013 00:39:32 +0000</pubDate>
			<dc:creator>mirkin</dc:creator>
			<guid isPermaLink="false">23129@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;The 0xFFFFFF was for the font colour before I ditched the textField and used one image per key so it's not used any more.&#60;/p&#62;
&#60;p&#62;All keys are from the same atlas but the background is from a different one.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Zambini on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23120</link>
			<pubDate>Thu, 31 Jan 2013 23:37:02 +0000</pubDate>
			<dc:creator>Zambini</dc:creator>
			<guid isPermaLink="false">23120@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Are all of your images on the same TextureAtlas? The performance optimization page has something on the Painter's algorithm &#60;a href=&#34;http://wiki.starling-framework.org/manual/performance_optimization#minimize_state_changes&#34; rel=&#34;nofollow&#34;&#62;http://wiki.starling-framework.org/manual/performance_optimization#minimize_state_changes&#60;/a&#62; that's worth looking at if you have things on different composition layers&#60;/p&#62;
&#60;p&#62;You could also try using the built in bitmapfont.createSprite function, just make sure that if you're tinting them, using 0xFFFFFF and 0xFFFFFE will be a state change per thing, meaning more draw calls. If you want to use white with other colors, use 0xFEFEFE or something instead of just 0xFFFFFF.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mirkin on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23103</link>
			<pubDate>Thu, 31 Jan 2013 22:11:49 +0000</pubDate>
			<dc:creator>mirkin</dc:creator>
			<guid isPermaLink="false">23103@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Yes, originally I used 2 images (key and keyPress) and used a textField to Label each button. But the frame rate was too low.&#60;/p&#62;
&#60;p&#62;So I created a new texture file with pre made keys so now I don't need the Textfields. But for all that effort I'm only getting 3 extra fps. I do get 1 less draw call per key without the textField though as expected.&#60;/p&#62;
&#60;p&#62;Tried alpha .99 of containing sprite and still a draw call for every single key. I thought that if I'm only using images created from the same texture atlas I'd only need one draw call.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Zambini on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23091</link>
			<pubDate>Thu, 31 Jan 2013 20:35:17 +0000</pubDate>
			<dc:creator>Zambini</dc:creator>
			<guid isPermaLink="false">23091@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Oh, so it's a Sprite and not a TextField?&#60;/p&#62;
&#60;p&#62;Try setting the main sprite everything is on to have an alpha of 0.99, not just the individual keys
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mirkin on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-23087</link>
			<pubDate>Thu, 31 Jan 2013 19:51:09 +0000</pubDate>
			<dc:creator>mirkin</dc:creator>
			<guid isPermaLink="false">23087@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Partial code. &#60;/p&#62;


&#60;div class=&#34;bb_syntax&#34;&#62;&#60;div class=&#34;code&#34;&#62;&#60;pre class=&#34;as3&#34; style=&#34;font-family:monospace;&#34;&#62;&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;private&#60;/span&#62; &#60;span style=&#34;color: #6699cc; font-weight: bold;&#34;&#62;var&#60;/span&#62; r1&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;Array&#60;/span&#62;=&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#91;&#60;/span&#62;&#60;span style=&#34;color: #990000;&#34;&#62;'Q'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'W'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'E'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'R'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'T'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'Y'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'U'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'I'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'O'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'P'&#60;/span&#62;,&#60;span style=&#34;color: #990000;&#34;&#62;'&#38;lt;'&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#93;&#60;/span&#62;;
&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;for&#60;/span&#62; &#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #6699cc; font-weight: bold;&#34;&#62;var&#60;/span&#62; &#60;span style=&#34;color: #004993;&#34;&#62;c&#60;/span&#62;&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;int&#60;/span&#62;=&#60;span style=&#34;color: #000000; font-weight:bold;&#34;&#62;0&#60;/span&#62;;c&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;&#38;lt;&#60;/span&#62;r1.&#60;span style=&#34;color: #004993;&#34;&#62;length&#60;/span&#62;;c&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;++&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;
			&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#123;&#60;/span&#62;
				&#60;span style=&#34;color: #6699cc; font-weight: bold;&#34;&#62;var&#60;/span&#62; tempKey&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;SoftKey=&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;new&#60;/span&#62; SoftKey&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;r1&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#91;&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;c&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#93;&#60;/span&#62;,r1&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#91;&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;c&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#93;&#60;/span&#62;,&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;new&#60;/span&#62; Image&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;Assets.getAtlas&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;.getTexture&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #990000;&#34;&#62;'softKeyBG_'&#60;/span&#62;&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;+&#60;/span&#62;r1&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#91;&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;c&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#93;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;,&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;new&#60;/span&#62; Image&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;Assets.getAtlas&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;.getTexture&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #990000;&#34;&#62;'softKeyBG_PRESS_'&#60;/span&#62;r1&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#91;&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;c&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#93;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;,0xFFFFFF,0xFFFFFF&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
				&#60;span style=&#34;color: #004993;&#34;&#62;addChild&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;tempKey&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
				tempKey.&#60;span style=&#34;color: #004993;&#34;&#62;x&#60;/span&#62;=r1X&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;+&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;tempKey.&#60;span style=&#34;color: #004993;&#34;&#62;width&#60;/span&#62;&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;+&#60;/span&#62;r1XGap&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;*&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;c&#60;/span&#62;;
				tempKey.&#60;span style=&#34;color: #004993;&#34;&#62;y&#60;/span&#62;=r1Y;
			&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#125;&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;public&#60;/span&#62; &#60;span style=&#34;color: #9900cc; font-weight: bold;&#34;&#62;class&#60;/span&#62; SoftKey extends &#60;span style=&#34;color: #004993;&#34;&#62;Sprite&#60;/span&#62;
	&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#123;&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;public&#60;/span&#62; &#60;span style=&#34;color: #339966; font-weight: bold;&#34;&#62;function&#60;/span&#62; SoftKey&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;lab&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;String&#60;/span&#62;,kc&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;String&#60;/span&#62;,bgTex&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;DisplayObject&#60;/span&#62;,bgTexPress&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;DisplayObject&#60;/span&#62;,tc&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;uint&#60;/span&#62;,tcp&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;uint&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;
		&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#123;&#60;/span&#62;
			&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;super&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			&#60;span style=&#34;color: #004993;&#34;&#62;keyCode&#60;/span&#62;=kc;
			textColour=tc;
			backgroundSkin=bgTex;
			backgroundSkin_PRESS=bgTexPress;
			&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;this&#60;/span&#62;.&#60;span style=&#34;color: #004993;&#34;&#62;addEventListener&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;Event&#60;/span&#62;.&#60;span style=&#34;color: #004993;&#34;&#62;ADDED_TO_STAGE&#60;/span&#62;,onAddedToStage&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			&#60;span style=&#34;color: #004993;&#34;&#62;addEventListener&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;TouchEvent.TOUCH,touched&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
		&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#125;&#60;/span&#62;
&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#125;&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;protected&#60;/span&#62; &#60;span style=&#34;color: #339966; font-weight: bold;&#34;&#62;function&#60;/span&#62; onAddedToStage&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;e&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;Event&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;void&#60;/span&#62;
		&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#123;&#60;/span&#62;
			&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;this&#60;/span&#62;.&#60;span style=&#34;color: #004993;&#34;&#62;removeEventListener&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #004993;&#34;&#62;Event&#60;/span&#62;.&#60;span style=&#34;color: #004993;&#34;&#62;ADDED_TO_STAGE&#60;/span&#62;,onAddedToStage&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			initialize&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
		&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#125;&#60;/span&#62;
&#38;nbsp;
		&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;private&#60;/span&#62; &#60;span style=&#34;color: #339966; font-weight: bold;&#34;&#62;function&#60;/span&#62; initialize&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;:&#60;/span&#62;&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;void&#60;/span&#62;
		&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#123;&#60;/span&#62;
			bg=&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;new&#60;/span&#62; &#60;span style=&#34;color: #004993;&#34;&#62;Sprite&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			bg.&#60;span style=&#34;color: #004993;&#34;&#62;addChild&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;backgroundSkin&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			&#60;span style=&#34;color: #004993;&#34;&#62;addChild&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;bg&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			bg_PRESS=&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;new&#60;/span&#62; &#60;span style=&#34;color: #004993;&#34;&#62;Sprite&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			bg_PRESS.&#60;span style=&#34;color: #004993;&#34;&#62;addChild&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;backgroundSkin_PRESS&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			&#60;span style=&#34;color: #004993;&#34;&#62;addChild&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;bg_PRESS&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			bg_PRESS.&#60;span style=&#34;color: #004993;&#34;&#62;visible&#60;/span&#62;=&#60;span style=&#34;color: #0033ff; font-weight: bold;&#34;&#62;false&#60;/span&#62;;
			&#60;span style=&#34;color: #009900;&#34;&#62;//this.alpha=0.999;&#60;/span&#62;
			&#60;span style=&#34;color: #009900;&#34;&#62;//bg.alpha=0.999;&#60;/span&#62;
			&#60;span style=&#34;color: #009900;&#34;&#62;//bg_PRESS.alpha=0.999;&#60;/span&#62;
			bg.flatten&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			bg_PRESS.flatten&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
			flatten&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#41;&#60;/span&#62;;
		&#60;span style=&#34;color: #000000;&#34;&#62;&#38;#125;&#60;/span&#62;&#60;/pre&#62;&#60;/div&#62;&#60;/div&#62;


</description>
		</item>
		<item>
			<title>Zambini on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-22863</link>
			<pubDate>Wed, 30 Jan 2013 01:28:35 +0000</pubDate>
			<dc:creator>Zambini</dc:creator>
			<guid isPermaLink="false">22863@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;Some things I've picked up with Starling (currently on commit 918d2090d32e5eaafff39c632d7d3382e0901a6d [Date:   Wed Jan 16 14:13:49 2013 +0100]):&#60;/p&#62;
&#60;p&#62;If you're ever doing any runtime coloring, set your main sprite's alpha to .99. Color counts as a state change and therefore will 2x your draw calls if you have it per item&#60;/p&#62;
&#60;p&#62;ANY new Starling.TextField will increase draw calls by +1 per&#60;/p&#62;
&#60;p&#62;Starling Button.text will increase draw calls by +1 per&#60;/p&#62;
&#60;p&#62;Do you meet any of those cases?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frisk on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-22860</link>
			<pubDate>Wed, 30 Jan 2013 00:33:17 +0000</pubDate>
			<dc:creator>frisk</dc:creator>
			<guid isPermaLink="false">22860@http://forum.starling-framework.org/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;
The keys have a background image and foreground image from the same texture atlas. I'm getting 52 draw calls. 2 for each key is that correct?
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;That sounds a lot. There must be something else going on here.&#60;br /&#62;
Do you use anything in your code to cause state changes as described here?&#60;br /&#62;
&#60;a href=&#34;http://wiki.starling-framework.org/manual/performance_optimization#minimize_state_changes&#34; rel=&#34;nofollow&#34;&#62;http://wiki.starling-framework.org/manual/performance_optimization#minimize_state_changes&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It's hard to tell without any actual code sample.&#60;br /&#62;
flatten() won't help in terms of draw calls. It's actually just batching the geometry data of the children at once to reduce (cpu) compute time on each frame.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mirkin on "Draw Calls &#38; Flatten for Soft Keyboard"</title>
			<link>http://forum.starling-framework.org/topic/draw-calls-flatten-for-soft-keyboard#post-22859</link>
			<pubDate>Tue, 29 Jan 2013 23:58:29 +0000</pubDate>
			<dc:creator>mirkin</dc:creator>
			<guid isPermaLink="false">22859@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;I'm trying to write a soft keyboard but having performance issues. Functionality is perfect though.&#60;/p&#62;
&#60;p&#62;The keys have a background image and foreground image from the same texture atlas. I'm getting 52 draw calls. 2 for each key is that correct?&#60;/p&#62;
&#60;p&#62;I'm hiding the pressed key image using visible=false so I would only expect 26 draw calls as only 1 is visible at a time. &#60;/p&#62;
&#60;p&#62;Since all 26 keys use images from the same texture atlas I half expected just 1 draw call.&#60;br /&#62;
Is that correct or do I misunderstand draw calls?&#60;/p&#62;
&#60;p&#62;So then I flattened the sprite that held all the keys. Still 52 draw calls.&#60;/p&#62;
&#60;p&#62;Then I switched to using a tiny texture atlas with just 2 keys (instead of one for each key and one for each pressed key) and used a TextField on each key and used Flatten on each individual key. Same frame rate but now 26 extra draw calls.&#60;/p&#62;
&#60;p&#62;I'm so confused.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frisk on "BitmapData - FloodFill with smooth/ tolerance"</title>
			<link>http://forum.starling-framework.org/topic/bitmapdata-floodfill-with-smooth-tolerance#post-22577</link>
			<pubDate>Sun, 27 Jan 2013 16:52:49 +0000</pubDate>
			<dc:creator>frisk</dc:creator>
			<guid isPermaLink="false">22577@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;hmm floodfill does not support tolerance out of the box.&#60;br /&#62;
But googling for it brings up certain results such as this:&#60;br /&#62;
&#60;a href=&#34;http://hangunsworld.com/code/com/hangunsworld/util/BMPFunctions.as&#34; rel=&#34;nofollow&#34;&#62;http://hangunsworld.com/code/com/hangunsworld/util/BMPFunctions.as&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>fukhaos on "BitmapData - FloodFill with smooth/ tolerance"</title>
			<link>http://forum.starling-framework.org/topic/bitmapdata-floodfill-with-smooth-tolerance#post-22520</link>
			<pubDate>Sat, 26 Jan 2013 12:34:22 +0000</pubDate>
			<dc:creator>fukhaos</dc:creator>
			<guid isPermaLink="false">22520@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;I am developing a drawing game app for kids.&#60;br /&#62;
And I want to use a paint bucket tool&#60;br /&#62;
for that I am using floodfill&#60;/p&#62;
&#60;p&#62;but the result is the first:&#60;br /&#62;
&#60;img src=&#34;http://www.freeimagehosting.net/uploads/6aa7b4ad53.png&#34; /&#62;&#60;/p&#62;
&#60;p&#62;but I want something like the secound image.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>fukhaos on "Drawing app for kids"</title>
			<link>http://forum.starling-framework.org/topic/drawing-app-for-kids#post-22206</link>
			<pubDate>Thu, 24 Jan 2013 18:43:24 +0000</pubDate>
			<dc:creator>fukhaos</dc:creator>
			<guid isPermaLink="false">22206@http://forum.starling-framework.org/</guid>
			<description>&#60;p&#62;@Astraport will be a image(BLACK/WHITE).
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
