<?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 on: Android: Render OpenGL on top of camera preview</title>
	<atom:link href="http://digitalbreed.com/2009/android-render-opengl-on-top-of-camera-preview/feed" rel="self" type="application/rss+xml" />
	<link>http://digitalbreed.com/2009/android-render-opengl-on-top-of-camera-preview</link>
	<description>matthias gall - product architect</description>
	<lastBuildDate>Mon, 07 May 2012 14:43:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Chuck</title>
		<link>http://digitalbreed.com/2009/android-render-opengl-on-top-of-camera-preview/comment-page-1#comment-34489</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Mon, 07 May 2012 14:43:44 +0000</pubDate>
		<guid isPermaLink="false">http://digitalbreed.com/?p=555#comment-34489</guid>
		<description>I have tried to modify this code to create the views in XML instead of inside the main activity but I have had no luck. I though I understood creating views in XML but I guess not. Most successful examples I have seen use the following strategy.

1. In your main activity, set as the main view the GLSurfaceView object using the setContentView method. 
2. Then, add the SurfaceView being used to draw the camera.
3. Add other SurfaceViews to the display as necessary.

I have not been able to locate a working example where the views are created in XML, even so, this must be possible. I tried modifying the CameraView constructor to include a surfaceview ie CameraView(Context context, SurfaceView surfaceView) but this just results in crashes. Any suggestions...  Thanks</description>
		<content:encoded><![CDATA[<p>I have tried to modify this code to create the views in XML instead of inside the main activity but I have had no luck. I though I understood creating views in XML but I guess not. Most successful examples I have seen use the following strategy.</p>
<p>1. In your main activity, set as the main view the GLSurfaceView object using the setContentView method.<br />
2. Then, add the SurfaceView being used to draw the camera.<br />
3. Add other SurfaceViews to the display as necessary.</p>
<p>I have not been able to locate a working example where the views are created in XML, even so, this must be possible. I tried modifying the CameraView constructor to include a surfaceview ie CameraView(Context context, SurfaceView surfaceView) but this just results in crashes. Any suggestions&#8230;  Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://digitalbreed.com/2009/android-render-opengl-on-top-of-camera-preview/comment-page-1#comment-32307</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Wed, 15 Feb 2012 17:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://digitalbreed.com/?p=555#comment-32307</guid>
		<description>xorr, thanks for sharing!</description>
		<content:encoded><![CDATA[<p>xorr, thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xorrr</title>
		<link>http://digitalbreed.com/2009/android-render-opengl-on-top-of-camera-preview/comment-page-1#comment-32305</link>
		<dc:creator>xorrr</dc:creator>
		<pubDate>Wed, 15 Feb 2012 17:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://digitalbreed.com/?p=555#comment-32305</guid>
		<description>for the next guy finding this post via google and having the same troubles
as crodgers:

I used:

&lt;code&gt;@Override
protected void onResume() {
	super.onResume();
	glView.onResume();
	glView.bringToFront();
}

@Override
protected void onPause() {
	super.onPause();
	glView.onPause();
	finish();
}&lt;/code&gt;

as a workaround. The issue is called &quot;context loss&quot;.</description>
		<content:encoded><![CDATA[<p>for the next guy finding this post via google and having the same troubles<br />
as crodgers:</p>
<p>I used:</p>
<p><code>@Override<br />
protected void onResume() {<br />
	super.onResume();<br />
	glView.onResume();<br />
	glView.bringToFront();<br />
}</p>
<p>@Override<br />
protected void onPause() {<br />
	super.onPause();<br />
	glView.onPause();<br />
	finish();<br />
}</code></p>
<p>as a workaround. The issue is called &#8220;context loss&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crodgers</title>
		<link>http://digitalbreed.com/2009/android-render-opengl-on-top-of-camera-preview/comment-page-1#comment-22568</link>
		<dc:creator>crodgers</dc:creator>
		<pubDate>Sun, 22 May 2011 18:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://digitalbreed.com/?p=555#comment-22568</guid>
		<description>How do I get glView to re-render onResume? I tried 

        @Override
	protected void onResume() {
		super.onResume();
		glView.onResume();
	}

       @Override
	protected void onPause() {
		super.onPause();
		glSurface.onPause();
        }
but that doesn&#039;t work. The camera view comes back up onResume, but the glSurfaceView doesn&#039;t.</description>
		<content:encoded><![CDATA[<p>How do I get glView to re-render onResume? I tried </p>
<p>        @Override<br />
	protected void onResume() {<br />
		super.onResume();<br />
		glView.onResume();<br />
	}</p>
<p>       @Override<br />
	protected void onPause() {<br />
		super.onPause();<br />
		glSurface.onPause();<br />
        }<br />
but that doesn&#8217;t work. The camera view comes back up onResume, but the glSurfaceView doesn&#8217;t.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

