Revision b7dba709
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedOutputSurface.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
abstract class DistortedOutputSurface extends DistortedSurface implements DistortedSlave |
29 | 29 |
{ |
30 |
private static final int NUM_MIPMAP = 4; |
|
31 |
static final int CUR_MIPMAP = 1; |
|
32 |
|
|
33 | 30 |
private static final int ATTACH = 0; |
34 | 31 |
private static final int DETACH = 1; |
35 | 32 |
private static final int DETALL = 2; |
... | ... | |
54 | 51 |
|
55 | 52 |
private ArrayList<Job> mJobs = new ArrayList<>(); |
56 | 53 |
|
57 |
DistortedFramebuffer[] mBuffer1, mBuffer2;
|
|
54 |
DistortedFramebuffer mBuffer1, mBuffer2; |
|
58 | 55 |
|
59 | 56 |
private long mTime; |
60 | 57 |
private float mFOV; |
... | ... | |
98 | 95 |
|
99 | 96 |
mClearDepth = 1.0f; |
100 | 97 |
|
101 |
mBuffer1 = new DistortedFramebuffer[NUM_MIPMAP]; |
|
102 |
mBuffer2 = new DistortedFramebuffer[NUM_MIPMAP]; |
|
103 |
|
|
104 | 98 |
createProjection(); |
105 | 99 |
} |
106 | 100 |
|
... | ... | |
177 | 171 |
} |
178 | 172 |
else |
179 | 173 |
{ |
180 |
if( mBuffer1[0]==null )
|
|
174 |
if( mBuffer1==null ) |
|
181 | 175 |
{ |
182 |
int sizeX = mWidth; |
|
183 |
int sizeY = mHeight; |
|
184 |
|
|
185 |
for(int j=0; j<NUM_MIPMAP; j++) |
|
186 |
{ |
|
187 |
mBuffer1[j] = new DistortedFramebuffer(mDepthCreated!=DONT_CREATE, DistortedSurface.TYPE_SYST, sizeX, sizeY); |
|
188 |
mBuffer2[j] = new DistortedFramebuffer(false , DistortedSurface.TYPE_SYST, sizeX, sizeY); |
|
189 |
|
|
190 |
sizeX *= 0.9f; |
|
191 |
sizeY *= 0.9f; |
|
192 |
} |
|
176 |
mBuffer1 = new DistortedFramebuffer(mDepthCreated!=DONT_CREATE, DistortedSurface.TYPE_SYST, mWidth, mHeight); |
|
177 |
mBuffer2 = new DistortedFramebuffer(false , DistortedSurface.TYPE_SYST, mWidth, mHeight); |
|
193 | 178 |
} |
194 | 179 |
|
195 |
numRenders += child.draw(time,mBuffer1[CUR_MIPMAP]);
|
|
180 |
numRenders += child.draw(time,mBuffer1); |
|
196 | 181 |
if( i==num-1 ) |
197 | 182 |
{ |
198 | 183 |
numRenders += currP.postprocess(time,this); |
Also available in: Unified diff
Roll back the recent MIPMAP work.