Revision 8ebbc730
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/library/main/DistortedTexture.java | ||
---|---|---|
34 | 34 |
*/ |
35 | 35 |
public class DistortedTexture extends DistortedSurface implements DistortedInputSurface |
36 | 36 |
{ |
37 |
private Bitmap mBmp= null;
|
|
37 |
private Bitmap mBmp; |
|
38 | 38 |
|
39 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 40 |
// We have to flip vertically every single Bitmap that we get fed with. |
... | ... | |
115 | 115 |
|
116 | 116 |
public DistortedTexture(int width, int height, int type) |
117 | 117 |
{ |
118 |
super(width,height,NOT_CREATED_YET,1,type); |
|
118 |
super(width,height,NOT_CREATED_YET,1,1,type);
|
|
119 | 119 |
mBmp= null; |
120 | 120 |
} |
121 | 121 |
|
... | ... | |
127 | 127 |
*/ |
128 | 128 |
public DistortedTexture(int width, int height) |
129 | 129 |
{ |
130 |
super(width,height,NOT_CREATED_YET,1,TYPE_USER); |
|
130 |
super(width,height,NOT_CREATED_YET,1,1,TYPE_USER);
|
|
131 | 131 |
mBmp= null; |
132 | 132 |
} |
133 | 133 |
|
Also available in: Unified diff
Port a commit from the master branch.
Finally properly fix the flashing on ARM Mali T880 GPU.
The flashing is caused by a 'full pipeline flush' (see DarkPhoton, https://www.opengl.org/discussion_boards/showthread.php/200754-Flashes-on-ARM-Mali?p=1291679&viewfull=1#post1291679 ). In order to combat it, first introduce the possibility that a single DistortedOutputSurface is backed up by more than one FBO. Then make DistortedScreen be derived from DistortedFramebuffer (which itself is derived from DistortedOutputSurface) and make it contain 3 FBOs, render to them in a circular queue fashion, and blit from a given FBO to the system FBO. The 'more than 1 intermediate FBO' queue prevents the pipeline flush.
Still some TODOs in DistortedFramebuffer remain (properly check for Framebuffer completness!)