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/DistortedFramebuffer.java
31 31
public class DistortedFramebuffer extends DistortedOutputSurface implements DistortedInputSurface
32 32
  {
33 33

  
34
///////////////////////////////////////////////////////////////////////////////////////////////////
35

  
36
  DistortedFramebuffer getBuffer()
37
    {
38
    return this;
39
    }
40

  
41 34
///////////////////////////////////////////////////////////////////////////////////////////////////
42 35
// Must be called from a thread holding OpenGL Context
43 36
// Watch out - this has the side-effect of binding a Texture and a Framebuffer!
......
135 128
    if( mDepthCreated!=DONT_CREATE ) mDepthCreated = NOT_CREATED_YET;
136 129
    }
137 130

  
138
///////////////////////////////////////////////////////////////////////////////////////////////////
139
// if new size fits into the size of the underlying Texture, just change the projection without
140
// reallocating the Texture. Otherwise, we need to reallocate.
141
//
142
// Must be called from a thread holding the OpenGL context.
143

  
144
  void resizeFast(int width, int height)
145
    {
146
    if( mWidth!=width || mHeight!=height )
147
      {
148
      mWidth = width;
149
      mHeight= height;
150
      createProjection();
151

  
152
      if( width> mSizeX || height> mSizeY)
153
        {
154
        mSizeX = width;
155
        mSizeY = height;
156
        delete();
157
        }
158
      }
159

  
160
    create();
161
    }
162

  
163 131
///////////////////////////////////////////////////////////////////////////////////////////////////
164 132
// create SYSTEM or TREE framebuffers (those are just like normal FBOs, just hold information
165 133
// that they were autocreated only for the Library's internal purposes (SYSTEM) or for using

Also available in: Unified diff