Project

General

Profile

« Previous | Next » 

Revision d79a56d3

Added by Leszek Koltunski about 7 years ago

Major refactoring: convert the Matrix Effects to be independent of the resolution of the surface we render to.

Re-write the first 15 apps to work with this.

View differences:

src/main/java/org/distorted/examples/effectqueue/EffectQueueRenderer.java
34 34
import org.distorted.library.DistortedTexture;
35 35
import org.distorted.library.Distorted;
36 36
import org.distorted.library.EffectNames;
37
import org.distorted.library.EffectTypes;
38 37
import org.distorted.library.message.EffectListener;
39 38
import org.distorted.library.message.EffectMessage;
40
import org.distorted.library.type.Static3D;
41 39

  
42 40
///////////////////////////////////////////////////////////////////////////////////////////////////
43 41

  
......
127 125

  
128 126
  public void onSurfaceChanged(GL10 glUnused, int width, int height)
129 127
    {
130
    mEffects.abortEffects(EffectTypes.MATRIX);
131
    mEffects.scale( new Static3D((float)width/texWidth,(float)height/texHeight,1) );
132 128
    mScreen.resize(width,height);
133 129
    mView.setScreenSize(width,height);
134 130
    }

Also available in: Unified diff