summaryrefslogtreecommitdiff
path: root/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
commit6b8552a4f6a44848255d77222e66aa92dd21b1b5 (patch)
tree951841ddd67f304b9c0a5bb1460d61d9eb9068c9 /rsProgramStore.cpp
parentd978780f34ac556e96b6e7c56ce6508dc310296e (diff)
downloadrs-6b8552a4f6a44848255d77222e66aa92dd21b1b5.tar.gz
Begin hooking up SurfaceConfig.
Change-Id: I328138f29affbed11fcfb5e9ed0872d4ba22d241
Diffstat (limited to 'rsProgramStore.cpp')
-rw-r--r--rsProgramStore.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/rsProgramStore.cpp b/rsProgramStore.cpp
index 3f90d7ac..586a89fd 100644
--- a/rsProgramStore.cpp
+++ b/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 {