<?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: setPixel - Recent Topics</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/setpixel</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 04:10:48 +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/setpixel/topics" rel="self" type="application/rss+xml" />

		<item>
			<title>Lam on "Fast set/getPixel for an opengl texture?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2449#post-15316</link>
			<pubDate>Tue, 13 Oct 2009 21:21:55 +0000</pubDate>
			<dc:creator>Lam</dc:creator>
			<guid isPermaLink="false">15316@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I've been trying find a way to access pixels in a texture in order to get/set the color of a pixel.</p>
<p>I've been fumbling around quite a lot. Hopefully someone can present an idea to accomplish this. My implementation works but is really slow.</p>
<p>What I've done is extend Texture2D as a MutableTexture2D that allow you to access a pixel in a really slow manner.</p>
<p>Since texture data resides in the GPU I had to store the array of pixel values.</p>
<p>I've gone through these attempts at creating this class.<br />
1st:<br />
   Using glTexImage2D to create a new texture from the data array. Which means I'm releasing the old texture, then binding a new texture. It works though really slowly.</p>
<p>2nd:<br />
   glTexSubImage2D allows portions of a texture image replacement so this should be faster but implementing this made MutableTexture2D slower than before... =/</p>
<p>3rd:<br />
   Read about PBO 'Pixel Buffer Objects' and the idea seems to fit my needs but, I think, it's not implemented in opengles1.1.</p>
<p>Right now I'm at a loss of ideas. If anyone can suggest anything then that would be awesome.
</p></description>
		</item>
		<item>
			<title>superking on "accessing raw pixel data of a cocos sprite"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/4994#post-29795</link>
			<pubDate>Fri, 12 Mar 2010 11:23:24 +0000</pubDate>
			<dc:creator>superking</dc:creator>
			<guid isPermaLink="false">29795@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>hello there,</p>
<p>I'm looking for a way to access the raw pixel data of a sprite. (getting a pointer or a buffer which i can manipulate to do some per pixel caluclations).</p>
<p>for my particular case this has not to be fast - it will not run in real time so I could live with some lack of performance as the manipulation would only take place once in a while.</p>
<p>which is the best way to achieve this? subclassing the texture class and adding some opengl-voodoo? or just creating new sprites from the pixels stored in the buffer whenever I need an updated texture?</p>
<p>any idea to do it fast? (just in case I should ever need this realtime'ish)
</p></description>
		</item>

	</channel>
</rss>

