<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<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>cocos2d for iPhone &#187; Tag: texture - Recent Posts</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/texture</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 02:55:46 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/tags/texture" rel="self" type="application/rss+xml" />

		<item>
			<title>abitofcode on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143527</link>
			<pubDate>Thu, 09 Feb 2012 23:02:13 +0000</pubDate>
			<dc:creator>abitofcode</dc:creator>
			<guid isPermaLink="false">143527@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Wow! That is nuts. I need mipmaps in Sketchshare but this would have been a lifesaver on a project last year.</p>
<p>Doh!
</p></description>
		</item>
		<item>
			<title>gogokodo on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143523</link>
			<pubDate>Thu, 09 Feb 2012 21:08:30 +0000</pubDate>
			<dc:creator>gogokodo</dc:creator>
			<guid isPermaLink="false">143523@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>In that apple topic one of the guys mentions this "For best use of memory, make sure both the width and the height are a multiple of 32 pixels". Is there anything to that? Would chopping off or adding 32 pixels be even more efficient? For example going from 1024x1024 to 1024x992 or 1024x1056.
</p></description>
		</item>
		<item>
			<title>rickms on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143522</link>
			<pubDate>Thu, 09 Feb 2012 21:06:50 +0000</pubDate>
			<dc:creator>rickms</dc:creator>
			<guid isPermaLink="false">143522@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>ayt: It's not cocos2d that's doing it, it's the openGL implementation on iOS, so no, you can't.
</p></description>
		</item>
		<item>
			<title>ayt on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143521</link>
			<pubDate>Thu, 09 Feb 2012 20:58:21 +0000</pubDate>
			<dc:creator>ayt</dc:creator>
			<guid isPermaLink="false">143521@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Can't I just comment out the line that allocates the mipmap's space?<br />
Where is it?
</p></description>
		</item>
		<item>
			<title>Birkemose on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143516</link>
			<pubDate>Thu, 09 Feb 2012 20:09:07 +0000</pubDate>
			<dc:creator>Birkemose</dc:creator>
			<guid isPermaLink="false">143516@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Isn't a 2048 *1024 a humongous waste of memory anyways?
</p></description>
		</item>
		<item>
			<title>Ernesto Corvi on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143515</link>
			<pubDate>Thu, 09 Feb 2012 20:03:52 +0000</pubDate>
			<dc:creator>Ernesto Corvi</dc:creator>
			<guid isPermaLink="false">143515@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>EDIT: I just followed the link to Apple's forum and it's indeed a bug. Disregard my last suggestion.
</p></description>
		</item>
		<item>
			<title>leocck on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143514</link>
			<pubDate>Thu, 09 Feb 2012 20:01:00 +0000</pubDate>
			<dc:creator>leocck</dc:creator>
			<guid isPermaLink="false">143514@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks Riq!
</p></description>
		</item>
		<item>
			<title>MandarX on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143513</link>
			<pubDate>Thu, 09 Feb 2012 20:00:38 +0000</pubDate>
			<dc:creator>MandarX</dc:creator>
			<guid isPermaLink="false">143513@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>thanks Riq
</p></description>
		</item>
		<item>
			<title>riq on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143498</link>
			<pubDate>Thu, 09 Feb 2012 19:38:45 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">143498@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/12069'>rickms</a>: :-)
</p></description>
		</item>
		<item>
			<title>rickms on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143491</link>
			<pubDate>Thu, 09 Feb 2012 19:34:49 +0000</pubDate>
			<dc:creator>rickms</dc:creator>
			<guid isPermaLink="false">143491@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks for the tip riq! I just enabled CC_TEXTURE_NPOT_SUPPORT and modified my TP script to max size @2047, rebuilt and my average memory usage went from ~63M to ~49M.
</p></description>
		</item>
		<item>
			<title>riq on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143490</link>
			<pubDate>Thu, 09 Feb 2012 19:34:19 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">143490@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/9358'>MandarX</a>:<br />
v1.0 and prior versions (0.99.x, 0.8.x, etc) should edit the <code>ccConfig.h</code> file.
</p></description>
		</item>
		<item>
			<title>MandarX on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143488</link>
			<pubDate>Thu, 09 Feb 2012 19:27:52 +0000</pubDate>
			<dc:creator>MandarX</dc:creator>
			<guid isPermaLink="false">143488@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks!</p>
<p>What about the previous releases?</p>
<p>I know I should upgrade to v1 or v2 but I'm working on 2 projects that use v0.99.5</p>
<p>I will switch to the latest version when I finish!!</p>
<p>MandarX
</p></description>
		</item>
		<item>
			<title>riq on "workaround for %33 texture memory bug"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/29121#post-143486</link>
			<pubDate>Thu, 09 Feb 2012 19:10:33 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">143486@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>So,</p>
<p>If you didn't know, when you create a texture, iOS will allocate 33% more memory, presumably to have enough room in case mipmaps are needed.<br />
( <a href="http://www.cocos2d-iphone.org/forum/topic/23887#post-129097" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/23887#post-129097</a> )</p>
<p>But it is worth noting that this bug is only present on POT (Power Of Two) textures ( Mipmapping is only supported on POT textures ).<br />
So, in order to reduce memory, what you have to do is two create NPOT textures.</p>
<p>eg:<br />
If you are using a 2048x2048 textures, convert it into a 2048x2047 textures (and you will save 33% memory).<br />
In case you can't make it smaller, then make it bigger. eg:<br />
If you have a 2048x1024 texture, create a 2048x1025 texture.</p>
<p>If you are using cocos2d v1.0, then you have to edit <code>ccConfig.h</code> with:<br />
<pre><code>#<a href='http://www.cocos2d-iphone.org/forum/tags/define'>define</a> CC_TEXTURE_NPOT_SUPPORT 1</code></pre>
<p>If you are using v1.1 or v2.0, then you are OK, since they already support NPOT textures by default.</p>
<p>Ways to know if you are using POT / NPOT textures:<br />
<strong>A)</strong>  Parse your PNG, GIF, BMP, JPEG files with <code>file</code>:<br />
<pre><code>$ find . -name &#34;*.png&#34; -print0 &#124; xargs -0 file</code></pre>
<p><strong>B)</strong> Run this line of code and see your debug console:<br />
<pre><code>[[CCTextureCache sharedTextureCache] dumpCachedTextureInfo];</code></pre>
<p>Further info:<br />
<a href="https://devforums.apple.com/thread/113889?start=0&#038;tstart=0" rel="nofollow">https://devforums.apple.com/thread/113889?start=0&#038;tstart=0</a></p>
<p>Important: NPOT textures can't have mipmaps, and also they only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}</p>
<p>Important 2: PVRTC (2bpp and 4bpp) textures can't be converted to NPOT
</p></description>
		</item>
		<item>
			<title>n8burba on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-143134</link>
			<pubDate>Tue, 07 Feb 2012 21:13:45 +0000</pubDate>
			<dc:creator>n8burba</dc:creator>
			<guid isPermaLink="false">143134@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/74101'>Liam</a> Hey, sorry about that. It looks like your email got caught in my spam filter. I just sent you the links.
</p></description>
		</item>
		<item>
			<title>Liam on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-143121</link>
			<pubDate>Tue, 07 Feb 2012 20:44:57 +0000</pubDate>
			<dc:creator>Liam</dc:creator>
			<guid isPermaLink="false">143121@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi Nathan,</p>
<p>I just bought your book and love it.  Thanks so much.  I sent you an email requesting the source code and you never responded :(</p>
<p>--<br />
Thanks.<br />
Liam
</p></description>
		</item>
		<item>
			<title>n8burba on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-143102</link>
			<pubDate>Tue, 07 Feb 2012 19:04:54 +0000</pubDate>
			<dc:creator>n8burba</dc:creator>
			<guid isPermaLink="false">143102@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/74151'>virag0</a> That's disappointing that its hard to get a hold of the book there. Have you tried buying the eBook from Packt Publishing as an alternative? You can find it here: <a href="http://www.packtpub.com/cocos2d-for-iphone-1-game-development-cookbook/book">http://www.packtpub.com/cocos2d-for-iphone-1-game-development-cookbook/book</a>. Thanks.
</p></description>
		</item>
		<item>
			<title>virag0 on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-142707</link>
			<pubDate>Sun, 05 Feb 2012 00:30:38 +0000</pubDate>
			<dc:creator>virag0</dc:creator>
			<guid isPermaLink="false">142707@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi, I tried to buy this book through my favourite seller in Australia and gave them the full details,<br />
but was told it was out of print, which must be impossible as it is obviously available,.<br />
I also saw it in ebay, but through paypal, which I do not use for personal/ethical reasons.</p>
<p>So, I am just hoping you can find an Australian distributor! </p>
<p>Cheers....
</p></description>
		</item>
		<item>
			<title>LittleBitStudio on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-142688</link>
			<pubDate>Sat, 04 Feb 2012 19:35:30 +0000</pubDate>
			<dc:creator>LittleBitStudio</dc:creator>
			<guid isPermaLink="false">142688@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Sorry to bump the thread.</p>
<p>BUT, great book. Cookbook style is much appreciated over the stale reference style. Thanks - Scott
</p></description>
		</item>
		<item>
			<title>n8burba on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-142238</link>
			<pubDate>Thu, 02 Feb 2012 03:22:52 +0000</pubDate>
			<dc:creator>n8burba</dc:creator>
			<guid isPermaLink="false">142238@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>FYI: Until February 9th you can get the print version of Cocos2d for iPhone 1 Game Development Cookbook for 13% off then get the PDF for 85% off.</p>
<p>Go to <a href="http://www.packtpub.com/cocos2d-for-iphone-1-game-development-cookbook/book">http://www.packtpub.com/cocos2d-for-iphone-1-game-development-cookbook/book</a> and type in discount code <strong>cocos13</strong>.
</p></description>
		</item>
		<item>
			<title>n8burba on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-142235</link>
			<pubDate>Thu, 02 Feb 2012 03:09:11 +0000</pubDate>
			<dc:creator>n8burba</dc:creator>
			<guid isPermaLink="false">142235@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/50564'>sullen</a> Ah, yes, the endless churn of technological development...I'll try to post an update to use the latest version of Lua. I'm also working on a Starter Kit for the book, so I can also take this into account there. Thanks for the info!
</p></description>
		</item>
		<item>
			<title>goodeats2009 on "CCProgressTimer with Sprite Frame?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/10540#post-142124</link>
			<pubDate>Wed, 01 Feb 2012 09:06:26 +0000</pubDate>
			<dc:creator>goodeats2009</dc:creator>
			<guid isPermaLink="false">142124@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>hi, how where you able to specify the texture rect for the progress timer?  I'm trying to replace my progress timer images with texture atlas but it shows the whole texture as oppose to just the image i need.<br />
i did this:<br />
<pre><code>levelTimer = [CCProgressTimer progressWithTexture:[[CCTextureCache sharedTextureCache]addImage:@&#34;scene2atlasIphone.png&#34;] ];</code></pre>
<p>i wanted to do something like what i do for sprites like this where you specify a textureRect<br />
<pre><code>CCSprite *timerSprite = [CCSprite spriteWithTexture:[levelTimerSprite texture] rect:[levelTimerSprite textureRect]];</code></pre>
<p>thanks
</p></description>
		</item>
		<item>
			<title>sullen on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-141918</link>
			<pubDate>Tue, 31 Jan 2012 00:52:00 +0000</pubDate>
			<dc:creator>sullen</dc:creator>
			<guid isPermaLink="false">141918@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hey, I just bought you book because I got very interesting the AI section with the book; specifically using Lua to perform dialog trees. However, I am having a little trouble with your manager. It seems that there was an update to Lua, and some of the updates make your code not compiled. Some of the changes are obvious, functions name and such. But I also saw that they remove some variables that the manager uses. Ultimately I decide to use an older version of Lua and everything works fine. :D
</p></description>
		</item>
		<item>
			<title>n8burba on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-141791</link>
			<pubDate>Sun, 29 Jan 2012 23:30:46 +0000</pubDate>
			<dc:creator>n8burba</dc:creator>
			<guid isPermaLink="false">141791@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/77046'>soulred12</a> One recipe covers the use of tilesets for a top-down game. This recipe could then be combined with the side scroller recipe(s) to create a tiled side scroller. Its basically a combination of Box2D and Tiled. To answer your final question, yes, the use of spritesheets is covered. There is a recipe that describes using the Zwoptex texture packer tool.</p>
<p>@<a href='http://www.cocos2d-iphone.org/forum/profile/7756'>Panajev</a> Please send an email to <a href="mailto:Cocos2dCookbook@gmail.com">Cocos2dCookbook@gmail.com</a> and I will email you the source code and extra chapter.
</p></description>
		</item>
		<item>
			<title>Panajev on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-141787</link>
			<pubDate>Sun, 29 Jan 2012 22:48:08 +0000</pubDate>
			<dc:creator>Panajev</dc:creator>
			<guid isPermaLink="false">141787@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p><a href="http://i.imgur.com/kwItj.png" rel="nofollow">http://i.imgur.com/kwItj.png</a>
</p></description>
		</item>
		<item>
			<title>soulred12 on "[Book] Cocos2d for iPhone 1 Game Development Cookbook"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28114/page/3#post-141719</link>
			<pubDate>Sun, 29 Jan 2012 08:48:22 +0000</pubDate>
			<dc:creator>soulred12</dc:creator>
			<guid isPermaLink="false">141719@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Does this book cover using tilesets for things like 2d sidescrollers or top-down games?  Also, what about sprite sheets?  Thanks.
</p></description>
		</item>
		<item>
			<title>calin on "Texture deformation based on edge shape points"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28604#post-141343</link>
			<pubDate>Thu, 26 Jan 2012 10:59:20 +0000</pubDate>
			<dc:creator>calin</dc:creator>
			<guid isPermaLink="false">141343@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I will explain my last question a bit better here, hoping someone can tell me how should I do this.</p>
<p>I currently have a <code>CCNode</code> that renders a texture using more than 4 vertices - let's say 100 vertices.</p>
<p>Is this the best way to do this, by extending <code>CCNode</code>? Or is it possible to extend <code>CCSprite</code>, and at the same time make the new class work with <code>CCSpriteBatchNode</code>? I basically want to have a custom <code>CCSprite</code> that has more than 4 vertices.</p>
<p>Also is it a good idea to render the texture using Vertex Buffer Objects similar to <code>CCTextureAtlas</code>?
</p></description>
		</item>
		<item>
			<title>calin on "Texture deformation based on edge shape points"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28604#post-141019</link>
			<pubDate>Tue, 24 Jan 2012 16:51:08 +0000</pubDate>
			<dc:creator>calin</dc:creator>
			<guid isPermaLink="false">141019@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Also is it a good idea to render the texture using Vertex Buffer Objects similar to CCTextureAtlas? (as I will have quite a large number of vertices)<br />
Not sure what is recommended here..
</p></description>
		</item>
		<item>
			<title>calin on "Texture deformation based on edge shape points"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28604#post-140984</link>
			<pubDate>Tue, 24 Jan 2012 12:13:51 +0000</pubDate>
			<dc:creator>calin</dc:creator>
			<guid isPermaLink="false">140984@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>What would be the best way to create a custom node in cocos 2.0 that will render a texture with more than 4 vertices (what class should you extend)?<br />
The reason I am asking this is because a sprite for example uses a quad to draw its texture, and also works with batch nodes.</p>
<p>So is it possible to extend <code>CCSprite</code>, and at the same time make the new class work with <code>CCSpriteBatchNode</code> ? Or you can only extend a <code>CCNode</code> that will draw itself and won't work with <code>CCSpriteBatchNode</code> ?</p>
<p>I also found this triangulation algorithm: <a href="http://code.google.com/p/poly2tri/" rel="nofollow">http://code.google.com/p/poly2tri/</a><br />
I haven't tried any yet, planning on doing that soon.
</p></description>
		</item>
		<item>
			<title>calin on "Texture deformation based on edge shape points"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28604#post-140930</link>
			<pubDate>Mon, 23 Jan 2012 23:28:30 +0000</pubDate>
			<dc:creator>calin</dc:creator>
			<guid isPermaLink="false">140930@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks, I'll look into this
</p></description>
		</item>
		<item>
			<title>Birkemose on "Texture deformation based on edge shape points"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28604#post-140929</link>
			<pubDate>Mon, 23 Jan 2012 23:23:20 +0000</pubDate>
			<dc:creator>Birkemose</dc:creator>
			<guid isPermaLink="false">140929@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Have a look at GLU<br />
<a href="http://code.google.com/p/iphone-glu/" rel="nofollow">http://code.google.com/p/iphone-glu/</a>
</p></description>
		</item>

	</channel>
</rss>

