Add support for selecting the color bit depth and if the application used a depth buffer.

This commit is contained in:
Jason Sams
2009-08-25 11:34:49 -07:00
parent dbade9d6a0
commit b13ada5071
19 changed files with 134 additions and 106 deletions

View File

@@ -141,15 +141,12 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
// ----------------------------------------------------------------------
public RenderScript createRenderScript() {
Log.v(RenderScript.LOG_TAG, "createRenderScript 1");
public RenderScript createRenderScript(boolean useDepth) {
Surface sur = null;
while ((sur == null) || (mSurfaceHolder == null)) {
sur = getHolder().getSurface();
}
Log.v(RenderScript.LOG_TAG, "createRenderScript 2");
RenderScript rs = new RenderScript(sur);
Log.v(RenderScript.LOG_TAG, "createRenderScript 3 rs");
RenderScript rs = new RenderScript(sur, useDepth);
return rs;
}