Revision 7602a827
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/library/main/DistortedScreen.java | ||
---|---|---|
1 | 1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
2 | 2 |
// Copyright 2016 Leszek Koltunski // |
3 | 3 |
// // |
4 |
// This file is part of Distorted. // |
|
4 |
// This file is part of DistortedLibrary. //
|
|
5 | 5 |
// // |
6 |
// Distorted is free software: you can redistribute it and/or modify // |
|
6 |
// DistortedLibrary is free software: you can redistribute it and/or modify //
|
|
7 | 7 |
// it under the terms of the GNU General Public License as published by // |
8 | 8 |
// the Free Software Foundation, either version 2 of the License, or // |
9 | 9 |
// (at your option) any later version. // |
10 | 10 |
// // |
11 |
// Distorted is distributed in the hope that it will be useful, // |
|
11 |
// DistortedLibrary is distributed in the hope that it will be useful, //
|
|
12 | 12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
13 | 13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
14 | 14 |
// GNU General Public License for more details. // |
15 | 15 |
// // |
16 | 16 |
// You should have received a copy of the GNU General Public License // |
17 |
// along with Distorted. If not, see <http://www.gnu.org/licenses/>. // |
|
17 |
// along with DistortedLibrary. If not, see <http://www.gnu.org/licenses/>. //
|
|
18 | 18 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
19 | 19 |
|
20 | 20 |
package org.distorted.library.main; |
... | ... | |
72 | 72 |
*/ |
73 | 73 |
public DistortedScreen() |
74 | 74 |
{ |
75 |
super(Distorted.FBO_QUEUE_SIZE,1,BOTH_DEPTH_STENCIL, TYPE_SYST, 1,1); |
|
75 |
super(DistortedLibrary.FBO_QUEUE_SIZE,1,BOTH_DEPTH_STENCIL, TYPE_SYST, 1,1);
|
|
76 | 76 |
mShowFPS = false; |
77 | 77 |
mCurRenderedFBO = 0; |
78 | 78 |
mToBeBlittedFBO = 0; |
... | ... | |
116 | 116 |
|
117 | 117 |
GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, 0); |
118 | 118 |
|
119 |
// workaround for the Mali issues: blit the framebuffer we have computed Distorted.FBO_QUEUE_SIZE |
|
119 |
// workaround for the Mali issues: blit the framebuffer we have computed DistortedLibrary.FBO_QUEUE_SIZE
|
|
120 | 120 |
// frames ago. Looks like FBO_QUEUE_SIZE=2 solves the issue already but I decided to play it safe and |
121 | 121 |
// make it equal to 3. |
122 | 122 |
// This of course introduces a delay and uses more memory, but it does not appear to have any effect |
... | ... | |
129 | 129 |
GLES31.glDisable(GLES31.GL_DEPTH_TEST); |
130 | 130 |
GLES31.glDisable(GLES31.GL_BLEND); |
131 | 131 |
|
132 |
Distorted.blitPriv(this); |
|
132 |
DistortedLibrary.blitPriv(this);
|
|
133 | 133 |
|
134 | 134 |
if( mShowFPS && fpsTexture.setAsInput()) |
135 | 135 |
{ |
136 |
Distorted.drawPriv(fpsEffects.getQueues(), FPS_W / 2.0f, FPS_H / 2.0f, fpsMesh, this, time); |
|
136 |
DistortedLibrary.drawPriv(fpsEffects.getQueues(), FPS_W / 2.0f, FPS_H / 2.0f, fpsMesh, this, time);
|
|
137 | 137 |
} |
138 | 138 |
|
139 |
if( ++mCurRenderedFBO>=Distorted.FBO_QUEUE_SIZE )
|
|
139 |
if( ++mCurRenderedFBO>= DistortedLibrary.FBO_QUEUE_SIZE )
|
|
140 | 140 |
{ |
141 | 141 |
mCurRenderedFBO = 0; |
142 | 142 |
if (mFirstCircle) mFirstCircle = false; |
143 | 143 |
} |
144 |
if( !mFirstCircle && ++mToBeBlittedFBO>=Distorted.FBO_QUEUE_SIZE )
|
|
144 |
if( !mFirstCircle && ++mToBeBlittedFBO>= DistortedLibrary.FBO_QUEUE_SIZE )
|
|
145 | 145 |
{ |
146 | 146 |
mToBeBlittedFBO=0; |
147 | 147 |
} |
Also available in: Unified diff
Rename all the classes that are not exported to application to 'Internal'