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

@@ -60,7 +60,7 @@ public class RenderScript {
native int nDeviceCreate();
native void nDeviceDestroy(int dev);
native int nContextCreate(int dev, Surface sur, int ver);
native int nContextCreate(int dev, Surface sur, int ver, boolean useDepth);
native void nContextDestroy(int con);
//void rsContextBindSampler (uint32_t slot, RsSampler sampler);
@@ -194,10 +194,10 @@ public class RenderScript {
///////////////////////////////////////////////////////////////////////////////////
//
public RenderScript(Surface sur) {
public RenderScript(Surface sur, boolean useDepth) {
mSurface = sur;
mDev = nDeviceCreate();
mContext = nContextCreate(mDev, mSurface, 0);
mContext = nContextCreate(mDev, mSurface, 0, useDepth);
// TODO: This should be protected by a lock
if(!mElementsInitialized) {