Skip to content

Commit

Permalink
Look for a format with stencil even if we only found RGB565.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 10, 2013
1 parent 357d224 commit c0c8df6
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,18 @@ public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
}

if (chosen == null) {
// Fourth, accept one with 16-bit color but depth required.
// Fourth, accept one with 16-bit color but depth and stencil required.
for (int i = 0; i < configs.length; i++) {
ConfigAttribs c = configs[i];
if (c.red >= 5 && c.green >= 6 && c.blue >= 5 && c.depth >= 16 && c.stencil >= 8) {
chosen = c;
break;
}
}
}

if (chosen == null) {
// Fifth, accept one with 16-bit color but depth required.
for (int i = 0; i < configs.length; i++) {
ConfigAttribs c = configs[i];
if (c.red >= 5 && c.green >= 6 && c.blue >= 5 && c.depth >= 16) {
Expand Down

0 comments on commit c0c8df6

Please sign in to comment.