Revision 5f35f1cb
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/main/DistortedScreen.java | ||
---|---|---|
65 | 65 |
private static MatrixEffectMove mMoveEffect = new MatrixEffectMove(mMoveVector); |
66 | 66 |
///// END DEBUGGING ////////////////////////// |
67 | 67 |
|
68 |
private int mQueueSize; |
|
68 | 69 |
private int mCurRenderedFBO; // During the first FBO_QUEUE_SIZE frames, we blit the very first |
69 | 70 |
private int mToBeBlittedFBO; // FBO one we have rendered. Then, we keep blitting the one we |
70 | 71 |
private boolean mFirstCircle; // rendered FBO_QUEUE_SIZE ago. |
... | ... | |
79 | 80 |
*/ |
80 | 81 |
public DistortedScreen() |
81 | 82 |
{ |
82 |
super(DistortedLibrary.FBO_QUEUE_SIZE,1,BOTH_DEPTH_STENCIL, TYPE_SYST, 1,1); |
|
83 |
super(DistortedLibrary.WAIT_FOR_FBO_QUEUE_SIZE,1,BOTH_DEPTH_STENCIL, TYPE_SYST, 1,1);
|
|
83 | 84 |
mDebugMode = DEBUG_MODE_NONE; |
84 | 85 |
mCurRenderedFBO = 0; |
85 | 86 |
mToBeBlittedFBO = 0; |
86 | 87 |
mFirstCircle = true; |
87 | 88 |
mDebugAllocated = false; |
89 |
mQueueSize = -1; |
|
88 | 90 |
} |
89 | 91 |
|
90 | 92 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
177 | 179 |
DistortedLibrary.drawPriv(debugEffects, debugMesh, this, time); |
178 | 180 |
} |
179 | 181 |
|
180 |
if( ++mCurRenderedFBO>= DistortedLibrary.FBO_QUEUE_SIZE ) |
|
182 |
if( mQueueSize<=0 ) |
|
183 |
{ |
|
184 |
mQueueSize = DistortedLibrary.getQueueSize(); |
|
185 |
} |
|
186 |
|
|
187 |
if( ++mCurRenderedFBO>=mQueueSize ) |
|
181 | 188 |
{ |
182 | 189 |
mCurRenderedFBO = 0; |
183 | 190 |
if (mFirstCircle) mFirstCircle = false; |
184 | 191 |
} |
185 |
if( !mFirstCircle && ++mToBeBlittedFBO>= DistortedLibrary.FBO_QUEUE_SIZE )
|
|
192 |
if( !mFirstCircle && ++mToBeBlittedFBO>=mQueueSize )
|
|
186 | 193 |
{ |
187 | 194 |
mToBeBlittedFBO=0; |
188 | 195 |
} |
Also available in: Unified diff
Only insert the 'Mali r12' FBO queue fix if we actually are running on a Mali GPU with driver version <22. (then FBOQueue=4 - unless we manually overide this down to 1 - else, always 1)