Project

General

Profile

« Previous | Next » 

Revision 60c1c622

Added by Leszek Koltunski about 7 years ago

Move the Postprocessing buffers to OutputSurface.

View differences:

src/main/java/org/distorted/library/DistortedScreen.java
27 27
 */
28 28
public class DistortedScreen extends DistortedOutputSurface
29 29
  {
30
  private DistortedFramebuffer mBuffer = null;
31 30

  
32 31
///////////////////////////////////////////////////////////////////////////////////////////////////
33 32
// here we don't manage underlying OpenGL assets ourselves
......
36 35
  void delete()   {}
37 36
  void recreate() {}
38 37

  
39
///////////////////////////////////////////////////////////////////////////////////////////////////
40

  
41
  DistortedFramebuffer getBuffer()
42
    {
43
    if( mBuffer==null )
44
      {
45
      mBuffer = new DistortedFramebuffer(true,DistortedSurface.TYPE_SYST,mWidth,mHeight);
46
      }
47

  
48
    if( mBuffer.mWidth != mWidth || mBuffer.mHeight != mHeight )
49
      {
50
      mBuffer.resizeFast(mWidth,mHeight);
51
      }
52

  
53
    return mBuffer;
54
    }
55

  
56 38
///////////////////////////////////////////////////////////////////////////////////////////////////
57 39
// PUBLIC API
58 40
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff