Project

General

Profile

« Previous | Next » 

Revision e3900503

Added by Leszek Koltunski about 5 years ago

Rename all the classes that are not exported to application to 'Internal'

View differences:

src/main/java/org/distorted/examples/generic/GenericRenderer.java
1 1
///////////////////////////////////////////////////////////////////////////////////////////////////
2 2
// Copyright 2016 Leszek Koltunski                                                               //
3 3
//                                                                                               //
4
// This file is part of Distorted.                                                               //
4
// This file is part of DistortedLibrary.                                                               //
5 5
//                                                                                               //
6
// Distorted is free software: you can redistribute it and/or modify                             //
6
// DistortedLibrary is free software: you can redistribute it and/or modify                             //
7 7
// it under the terms of the GNU General Public License as published by                          //
8 8
// the Free Software Foundation, either version 2 of the License, or                             //
9 9
// (at your option) any later version.                                                           //
10 10
//                                                                                               //
11
// Distorted is distributed in the hope that it will be useful,                                  //
11
// DistortedLibrary is distributed in the hope that it will be useful,                                  //
12 12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13 13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14 14
// GNU General Public License for more details.                                                  //
15 15
//                                                                                               //
16 16
// You should have received a copy of the GNU General Public License                             //
17
// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
17
// along with DistortedLibrary.  If not, see <http://www.gnu.org/licenses/>.                            //
18 18
///////////////////////////////////////////////////////////////////////////////////////////////////
19 19

  
20 20
package org.distorted.examples.generic;
......
29 29
import org.distorted.library.effect.MatrixEffectMove;
30 30
import org.distorted.library.effect.MatrixEffectQuaternion;
31 31
import org.distorted.library.effect.MatrixEffectScale;
32
import org.distorted.library.main.Distorted;
32
import org.distorted.library.main.DistortedLibrary;
33 33
import org.distorted.library.main.DistortedEffects;
34 34
import org.distorted.library.main.DistortedNode;
35 35
import org.distorted.library.main.DistortedScreen;
......
145 145

  
146 146
      resetMatrixEffects();
147 147

  
148
      // quite tricky: move the background exactly to the FAR plane! (see DistortedOutputSurface.setProjection() )
148
      // quite tricky: move the background exactly to the FAR plane! (see InternalOutputSurface.setProjection() )
149 149
      backgroundEffects.apply(new MatrixEffectMove(mMoveBackground) );
150 150
      backgroundEffects.apply(new MatrixEffectScale(mScaleBackground) );
151 151
      }
......
272 272
      float factorBackX = ((float)width)/backgroundSize;
273 273
      float factorBackY = ((float)height)/backgroundSize;
274 274

  
275
      // quite tricky: move the background exactly to the FAR plane! (see DistortedOutputSurface.setProjection() )
275
      // quite tricky: move the background exactly to the FAR plane! (see InternalOutputSurface.setProjection() )
276 276
      mMoveBackground.set( -width*0.5f, -height*0.5f, -0.9f*height*(1.0f-NEAR)/(2.0f*(float)Math.tan(FOV*Math.PI/360)) );
277 277
      mScaleBackground.set( 2*factorBackX, 2*factorBackY, 1.0f );
278 278

  
......
313 313
      mCenterTexture.setTexture(bitmapC);
314 314
      mRegionTexture.setTexture(bitmapR);
315 315

  
316
      Distorted.setMax(EffectType.VERTEX  ,10);
317
      Distorted.setMax(EffectType.FRAGMENT,10);
316
      DistortedLibrary.setMax(EffectType.VERTEX  ,10);
317
      DistortedLibrary.setMax(EffectType.FRAGMENT,10);
318 318

  
319 319
      Effect.enableEffects(EffectType.VERTEX);
320 320
      Effect.enableEffects(EffectType.FRAGMENT);
......
322 322

  
323 323
      try
324 324
        {
325
        Distorted.onCreate(mView.getContext());
325
        DistortedLibrary.onCreate(mView.getContext());
326 326
        }
327 327
      catch(Exception ex)
328 328
        {

Also available in: Unified diff