Project

General

Profile

« Previous | Next » 

Revision 133cbb2b

Added by Leszek Koltunski about 7 years ago

Introduce DistortedRenderable, a base class for Texture and Framebuffer

View differences:

src/main/java/org/distorted/library/DistortedTree.java
200 200

  
201 201
  void drawRecursive(long currTime, DistortedFramebuffer df)
202 202
    {
203
    mTexture.createTexture();
203
    mTexture.create();
204
    float halfX = mTexture.getWidth()/2.0f;
205
    float halfY = mTexture.getHeight()/2.0f;
204 206

  
205 207
    if( mNumChildren[0]<=0 )
206 208
      {
......
208 210
      }
209 211
    else
210 212
      {
211
      mData.mFBO.createFBO();
213
      mData.mFBO.create();
212 214

  
213 215
      if( mData.numRendered==0 )
214 216
        {
......
218 220
        GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
219 221

  
220 222
        if( mTexture.setAsInput() )
221
          DistortedEffects.drawNoEffectsPriv(mTexture.mHalfX, mTexture.mHalfY, mMesh, mData.mFBO);
223
          DistortedEffects.drawNoEffectsPriv(halfX, halfY, mMesh, mData.mFBO);
222 224

  
223 225
        synchronized(this)
224 226
          {
......
234 236
      mData.mFBO.setAsInput();
235 237
      }
236 238

  
237
    mEffects.drawPriv(mTexture.mHalfX, mTexture.mHalfY, mMesh, df, currTime);
239
    mEffects.drawPriv(halfX, halfY, mMesh, df, currTime);
238 240
    }
239 241

  
240 242
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff