<?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: direct pixel access - Recent Topics</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/direct-pixel-access</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:37:00 +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/direct-pixel-access/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>

	</channel>
</rss>

