File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
core/src/processing/opengl Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -527,8 +527,8 @@ protected void createFBOLayer() {
527527 boolean multisample = 1 < numSamples ;
528528
529529 boolean packed = ext .indexOf ("packed_depth_stencil" ) != -1 ;
530- int depthBits = getDepthBits ();
531- int stencilBits = getStencilBits ();
530+ int depthBits = PApplet . min ( REQUESTED_DEPTH_BITS , getDepthBits () );
531+ int stencilBits = PApplet . min ( REQUESTED_STENCIL_BITS , getStencilBits () );
532532
533533 genTextures (2 , glColorTex );
534534 for (int i = 0 ; i < 2 ; i ++) {
Original file line number Diff line number Diff line change @@ -452,15 +452,13 @@ protected boolean isFBOBacked() {
452452
453453 @ Override
454454 protected int getDepthBits () {
455- if (USE_JOGL_FBOLAYER ) return capabilities .getDepthBits ();
456- else return super .getDepthBits ();
455+ return capabilities .getDepthBits ();
457456 }
458457
459458
460459 @ Override
461460 protected int getStencilBits () {
462- if (USE_JOGL_FBOLAYER ) return capabilities .getStencilBits ();
463- else return super .getStencilBits ();
461+ return capabilities .getStencilBits ();
464462 }
465463
466464
You can’t perform that action at this time.
0 commit comments