summaryrefslogtreecommitdiff
path: root/libs/rs/rsProgramStore.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-10-13 15:31:10 -0700
committerJason Sams <rjsams@android.com>2010-10-13 15:31:10 -0700
commit11c8af9ded3a319635b4e91a639a616ec97fc7e3 (patch)
treeb229be5c62ec938c4cf2f11ca6aa15d2b85e5ba2 /libs/rs/rsProgramStore.cpp
parent3c0365518f3f664634ed0f9464c351acf3b7e86d (diff)
Begin hooking up SurfaceConfig.
Change-Id: I328138f29affbed11fcfb5e9ed0872d4ba22d241
Diffstat (limited to 'libs/rs/rsProgramStore.cpp')
-rw-r--r--libs/rs/rsProgramStore.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/libs/rs/rsProgramStore.cpp b/libs/rs/rsProgramStore.cpp
index 3f90d7ac88dc..586a89fd1f60 100644
--- a/libs/rs/rsProgramStore.cpp
+++ b/libs/rs/rsProgramStore.cpp
@@ -76,14 +76,25 @@ void ProgramStore::setupGL2(const Context *rsc, ProgramStoreState *state)
//LOGE("pfs %i, %i, %x", mDepthWriteEnable, mDepthTestEnable, mDepthFunc);
- glDepthMask(mDepthWriteEnable);
- if(mDepthTestEnable || mDepthWriteEnable) {
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(mDepthFunc);
+ if (rsc->mUserSurfaceConfig.depthMin > 0) {
+ glDepthMask(mDepthWriteEnable);
+ if(mDepthTestEnable || mDepthWriteEnable) {
+ glEnable(GL_DEPTH_TEST);
+ glDepthFunc(mDepthFunc);
+ } else {
+ glDisable(GL_DEPTH_TEST);
+ }
} else {
+ glDepthMask(false);
glDisable(GL_DEPTH_TEST);
}
+ if (rsc->mUserSurfaceConfig.stencilMin > 0) {
+ } else {
+ glStencilMask(0);
+ glDisable(GL_STENCIL_TEST);
+ }
+
if (mDitherEnable) {
glEnable(GL_DITHER);
} else {