<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Digitally Bold</title>
	<atom:link href="http://digitallybold.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://digitallybold.com</link>
	<description>iPhone Games, Flash Games, Mobile Games</description>
	<lastBuildDate>Fri, 03 Feb 2012 02:22:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by JamesGrote</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-28</link>
		<dc:creator>JamesGrote</dc:creator>
		<pubDate>Fri, 03 Feb 2012 02:22:19 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-28</guid>
		<description>Fantastic article!  Thanks for sharing. I&#039;ve been buried in subtractive color shading for my apps, and this post is inspiring me to try adding colors.</description>
		<content:encoded><![CDATA[<p>Fantastic article!  Thanks for sharing. I&#8217;ve been buried in subtractive color shading for my apps, and this post is inspiring me to try adding colors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by Firstmage</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-27</link>
		<dc:creator>Firstmage</dc:creator>
		<pubDate>Thu, 02 Feb 2012 18:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-27</guid>
		<description>ah......... got it. 

I&#039;ll let you know When I solve this problem.

Thanks.</description>
		<content:encoded><![CDATA[<p>ah&#8230;&#8230;&#8230; got it. </p>
<p>I&#8217;ll let you know When I solve this problem.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by Par</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-26</link>
		<dc:creator>Par</dc:creator>
		<pubDate>Thu, 02 Feb 2012 13:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-26</guid>
		<description>It will not work with 2.0.

2.0 uses OpenGL ES 2.0 which uses shaders. If you are using 2.0 there are much easier and better ways to manipulate how textures are rendered. That being said 2.0 is not supported by older devices. 

Quoted from the cocos2d website about the 2.0 vs 1.0 line:


&lt;blockquote&gt;A: It depends on your requirements, and varies from case to case.
A: If you need to support older devices (1st &amp; 2nd generation iPhones) you should use cocos2d v1.x
A: If you need to GL shaders, you should use cocos2d v2.x
A: v2.0 is about supporting new technologies (blocks, OpenGL ES 2.0, etc) and improving the current API, while cocos2d v1.x is about backward compatibility&lt;/blockquote&gt;

If you want to use 2.0 then you should look into shaders.</description>
		<content:encoded><![CDATA[<p>It will not work with 2.0.</p>
<p>2.0 uses OpenGL ES 2.0 which uses shaders. If you are using 2.0 there are much easier and better ways to manipulate how textures are rendered. That being said 2.0 is not supported by older devices. </p>
<p>Quoted from the cocos2d website about the 2.0 vs 1.0 line:</p>
<blockquote><p>A: It depends on your requirements, and varies from case to case.<br />
A: If you need to support older devices (1st &amp; 2nd generation iPhones) you should use cocos2d v1.x<br />
A: If you need to GL shaders, you should use cocos2d v2.x<br />
A: v2.0 is about supporting new technologies (blocks, OpenGL ES 2.0, etc) and improving the current API, while cocos2d v1.x is about backward compatibility</p></blockquote>
<p>If you want to use 2.0 then you should look into shaders.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by Firstmage</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-24</link>
		<dc:creator>Firstmage</dc:creator>
		<pubDate>Thu, 02 Feb 2012 03:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-24</guid>
		<description>Thanks to sharing.

I tried your code(add) on cocos2d 2.0beta2. but it doesn&#039;t work...

if you have any idea of this, plz share it. 

this is cocos2d 2.0 beta2 - CCSprite - draw method.


{
	CC_PROFILER_START_CATEGORY(kCCProfilerCategorySprite, @&quot;CCSprite - draw&quot;);

	NSAssert(!batchNode_, @&quot;If CCSprite is being rendered by CCSpriteBatchNode, CCSprite#draw SHOULD NOT be called&quot;);

	CC_NODE_DRAW_SETUP();

	ccGLBlendFunc( blendFunc_.src, blendFunc_.dst );

	ccGLBindTexture2D( [texture_ name] );

	//
	// Attributes
	//

	ccGLEnableVertexAttribs( kCCVertexAttribFlag_PosColorTex );

#define kQuadSize sizeof(quad_.bl)
	long offset = (long)&amp;quad_;

	// vertex
	NSInteger diff = offsetof( ccV3F_C4B_T2F, vertices);
	glVertexAttribPointer(kCCVertexAttrib_Position, 3, GL_FLOAT, GL_FALSE, kQuadSize, (void*) (offset + diff));

	// texCoods
	diff = offsetof( ccV3F_C4B_T2F, texCoords);
	glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, kQuadSize, (void*)(offset + diff));

	// color
	diff = offsetof( ccV3F_C4B_T2F, colors);
	glVertexAttribPointer(kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (void*)(offset + diff));


	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

	CHECK_GL_ERROR_DEBUG();


#if CC_SPRITE_DEBUG_DRAW == 1
	// draw bounding box
	CGPoint vertices[4]={
		ccp(quad_.tl.vertices.x,quad_.tl.vertices.y),
		ccp(quad_.bl.vertices.x,quad_.bl.vertices.y),
		ccp(quad_.br.vertices.x,quad_.br.vertices.y),
		ccp(quad_.tr.vertices.x,quad_.tr.vertices.y),
	};
	ccDrawPoly(vertices, 4, YES);
#elif CC_SPRITE_DEBUG_DRAW == 2
	// draw texture box
	CGSize s = self.textureRect.size;
	CGPoint offsetPix = self.offsetPosition;
	CGPoint vertices[4] = {
		ccp(offsetPix.x,offsetPix.y), ccp(offsetPix.x+s.width,offsetPix.y),
		ccp(offsetPix.x+s.width,offsetPix.y+s.height), ccp(offsetPix.x,offsetPix.y+s.height)
	};
	ccDrawPoly(vertices, 4, YES);
#endif // CC_SPRITE_DEBUG_DRAW


	CC_PROFILER_STOP_CATEGORY(kCCProfilerCategorySprite, @&quot;CCSprite - draw&quot;);
}


have a good day.</description>
		<content:encoded><![CDATA[<p>Thanks to sharing.</p>
<p>I tried your code(add) on cocos2d 2.0beta2. but it doesn&#8217;t work&#8230;</p>
<p>if you have any idea of this, plz share it. </p>
<p>this is cocos2d 2.0 beta2 &#8211; CCSprite &#8211; draw method.</p>
<p>{<br />
	CC_PROFILER_START_CATEGORY(kCCProfilerCategorySprite, @&#8221;CCSprite &#8211; draw&#8221;);</p>
<p>	NSAssert(!batchNode_, @&#8221;If CCSprite is being rendered by CCSpriteBatchNode, CCSprite#draw SHOULD NOT be called&#8221;);</p>
<p>	CC_NODE_DRAW_SETUP();</p>
<p>	ccGLBlendFunc( blendFunc_.src, blendFunc_.dst );</p>
<p>	ccGLBindTexture2D( [texture_ name] );</p>
<p>	//<br />
	// Attributes<br />
	//</p>
<p>	ccGLEnableVertexAttribs( kCCVertexAttribFlag_PosColorTex );</p>
<p>#define kQuadSize sizeof(quad_.bl)<br />
	long offset = (long)&amp;quad_;</p>
<p>	// vertex<br />
	NSInteger diff = offsetof( ccV3F_C4B_T2F, vertices);<br />
	glVertexAttribPointer(kCCVertexAttrib_Position, 3, GL_FLOAT, GL_FALSE, kQuadSize, (void*) (offset + diff));</p>
<p>	// texCoods<br />
	diff = offsetof( ccV3F_C4B_T2F, texCoords);<br />
	glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, kQuadSize, (void*)(offset + diff));</p>
<p>	// color<br />
	diff = offsetof( ccV3F_C4B_T2F, colors);<br />
	glVertexAttribPointer(kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (void*)(offset + diff));</p>
<p>	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);</p>
<p>	CHECK_GL_ERROR_DEBUG();</p>
<p>#if CC_SPRITE_DEBUG_DRAW == 1<br />
	// draw bounding box<br />
	CGPoint vertices[4]={<br />
		ccp(quad_.tl.vertices.x,quad_.tl.vertices.y),<br />
		ccp(quad_.bl.vertices.x,quad_.bl.vertices.y),<br />
		ccp(quad_.br.vertices.x,quad_.br.vertices.y),<br />
		ccp(quad_.tr.vertices.x,quad_.tr.vertices.y),<br />
	};<br />
	ccDrawPoly(vertices, 4, YES);<br />
#elif CC_SPRITE_DEBUG_DRAW == 2<br />
	// draw texture box<br />
	CGSize s = self.textureRect.size;<br />
	CGPoint offsetPix = self.offsetPosition;<br />
	CGPoint vertices[4] = {<br />
		ccp(offsetPix.x,offsetPix.y), ccp(offsetPix.x+s.width,offsetPix.y),<br />
		ccp(offsetPix.x+s.width,offsetPix.y+s.height), ccp(offsetPix.x,offsetPix.y+s.height)<br />
	};<br />
	ccDrawPoly(vertices, 4, YES);<br />
#endif // CC_SPRITE_DEBUG_DRAW</p>
<p>	CC_PROFILER_STOP_CATEGORY(kCCProfilerCategorySprite, @&#8221;CCSprite &#8211; draw&#8221;);<br />
}</p>
<p>have a good day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by Par</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-22</link>
		<dc:creator>Par</dc:creator>
		<pubDate>Tue, 17 Jan 2012 13:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-22</guid>
		<description>That&#039;s the issue with a Cocos2d CCSpriteBatchNode. It&#039;s made to render multiple sprites together.  If you want one to be rendered differently than the other you are going to have to rewrite how the CCSpriteBatchNode works or use different multiple batch nodes. 

Depending on what you are doing, I think you will find that using multiple batch nodes will take a very minimal hit on performance. And I do mean very minimal.</description>
		<content:encoded><![CDATA[<p>That&#8217;s the issue with a Cocos2d CCSpriteBatchNode. It&#8217;s made to render multiple sprites together.  If you want one to be rendered differently than the other you are going to have to rewrite how the CCSpriteBatchNode works or use different multiple batch nodes. </p>
<p>Depending on what you are doing, I think you will find that using multiple batch nodes will take a very minimal hit on performance. And I do mean very minimal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by center</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-21</link>
		<dc:creator>center</dc:creator>
		<pubDate>Tue, 17 Jan 2012 08:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-21</guid>
		<description>Thanks for your help! 

Could you give me some more clues on what I should override in the drawQuads method? I have tried to study and understand the code and methods in CCTextureAtlas but I don&#039;t really know how to modify it so that I can do both additive tinting for some sprites and normal tinting for the other sprites in one single batchnode.</description>
		<content:encoded><![CDATA[<p>Thanks for your help! </p>
<p>Could you give me some more clues on what I should override in the drawQuads method? I have tried to study and understand the code and methods in CCTextureAtlas but I don&#8217;t really know how to modify it so that I can do both additive tinting for some sprites and normal tinting for the other sprites in one single batchnode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by Par</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-20</link>
		<dc:creator>Par</dc:creator>
		<pubDate>Sun, 15 Jan 2012 14:51:48 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-20</guid>
		<description>It will work in a batch node but rendering is done differently with batch nodes than sprites. You will need to either modify the draw call of the CCSpriteBatchNode or the (I think) drawQuads of the CCTextureAtlas.  I prefer working with CCTextureAtlas because it&#039;s closer to the draw. For me to make it work, I subclassed CCSpriteBatchNode and CCTextureAtlas.  In CCSpriteBatchNode all I did was make sure with it initialized it&#039;s CCTextureAtlas it initialized my subclass instead. Then in the CCTextureAtlas subclass I wrote my code for additive coloring and/or tinting.</description>
		<content:encoded><![CDATA[<p>It will work in a batch node but rendering is done differently with batch nodes than sprites. You will need to either modify the draw call of the CCSpriteBatchNode or the (I think) drawQuads of the CCTextureAtlas.  I prefer working with CCTextureAtlas because it&#8217;s closer to the draw. For me to make it work, I subclassed CCSpriteBatchNode and CCTextureAtlas.  In CCSpriteBatchNode all I did was make sure with it initialized it&#8217;s CCTextureAtlas it initialized my subclass instead. Then in the CCTextureAtlas subclass I wrote my code for additive coloring and/or tinting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cocos2D: Additive Coloring &amp; Flash Style Tinting by center</title>
		<link>http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting#comment-19</link>
		<dc:creator>center</dc:creator>
		<pubDate>Sat, 14 Jan 2012 20:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=314#comment-19</guid>
		<description>Thanks for the posts!
Does it work in a batch node? Let&#039;s say in my game I will have a batch node for all of my sprites. And I just need several sprites to have additive coloring.</description>
		<content:encoded><![CDATA[<p>Thanks for the posts!<br />
Does it work in a batch node? Let&#8217;s say in my game I will have a batch node for all of my sprites. And I just need several sprites to have additive coloring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Project Faery and The Grass Tower by Par</title>
		<link>http://digitallybold.com/299/project-faery-and-the-grass-tower#comment-4</link>
		<dc:creator>Par</dc:creator>
		<pubDate>Tue, 20 Dec 2011 13:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=299#comment-4</guid>
		<description>Thanks! Hopefully late winter / early spring 2012  :)</description>
		<content:encoded><![CDATA[<p>Thanks! Hopefully late winter / early spring 2012  <img src='http://digitallybold.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Project Faery and The Grass Tower by td games</title>
		<link>http://digitallybold.com/299/project-faery-and-the-grass-tower#comment-3</link>
		<dc:creator>td games</dc:creator>
		<pubDate>Sat, 17 Dec 2011 22:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://digitallybold.com/?p=299#comment-3</guid>
		<description>This seems like it will be a really fun tower defense game. When will it be released?</description>
		<content:encoded><![CDATA[<p>This seems like it will be a really fun tower defense game. When will it be released?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

