Project

General

Profile

« Previous | Next » 

Revision 687263cc

Added by Leszek Koltunski about 4 years ago

Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)

View differences:

src/main/java/org/distorted/examples/rubik/RubikSurfaceView.java
31 31

  
32 32
class RubikSurfaceView extends GLSurfaceView
33 33
{
34
    private WeakReference<RubikActivity> mWeakAct;
35

  
36
///////////////////////////////////////////////////////////////////////////////////////////////////
37

  
38 34
    public RubikSurfaceView(Context context, AttributeSet attrs)
39 35
      {
40 36
      super(context,attrs);
41 37

  
42 38
      if(!isInEditMode())
43 39
        {
44
        mWeakAct = new WeakReference<>( (RubikActivity)context);
45

  
46 40
        final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
47 41
        final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
48 42
        setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 );
......
54 48

  
55 49
    RubikActivity getRubikActivity()
56 50
      {
57
      return mWeakAct.get();
51
      return (RubikActivity)getContext();
58 52
      }
59 53
}
60 54

  

Also available in: Unified diff