Revision 9b9440a0
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/examples/check/CheckActivity.java | ||
---|---|---|
34 | 34 |
public class CheckActivity extends Activity |
35 | 35 |
{ |
36 | 36 |
private NumberPicker mVPicker, mFPicker; |
37 |
private static int maxV, maxF;
|
|
37 |
private int maxV, maxF; |
|
38 | 38 |
|
39 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 40 |
|
... | ... | |
118 | 118 |
|
119 | 119 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
120 | 120 |
|
121 |
public static int getMaxV()
|
|
121 |
public int getMaxV() |
|
122 | 122 |
{ |
123 | 123 |
return maxV; |
124 | 124 |
} |
125 | 125 |
|
126 | 126 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
127 | 127 |
|
128 |
public static int getMaxF()
|
|
128 |
public int getMaxF() |
|
129 | 129 |
{ |
130 | 130 |
return maxF; |
131 | 131 |
} |
src/main/java/org/distorted/examples/check/CheckRenderer.java | ||
---|---|---|
52 | 52 |
class CheckRenderer implements GLSurfaceView.Renderer |
53 | 53 |
{ |
54 | 54 |
private static final String TAG = "CheckRenderer"; |
55 |
private static String compilationResult; |
|
56 |
private static String compilationTitle; |
|
55 | 57 |
|
56 | 58 |
private GLSurfaceView mView; |
57 | 59 |
private DistortedBitmap mSuccess; |
58 | 60 |
private int bmpHeight, bmpWidth; |
59 | 61 |
|
60 |
public static String compilationResult; |
|
61 |
public static String compilationTitle; |
|
62 |
|
|
63 | 62 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
64 | 63 |
|
65 |
public CheckRenderer(GLSurfaceView view)
|
|
64 |
CheckRenderer(GLSurfaceView view)
|
|
66 | 65 |
{ |
67 | 66 |
mView = view; |
68 | 67 |
|
69 |
Distorted.setMaxVertex(CheckActivity.getMaxV()); |
|
70 |
Distorted.setMaxFragment(CheckActivity.getMaxF()); |
|
68 |
CheckActivity act = (CheckActivity)mView.getContext(); |
|
69 |
|
|
70 |
Distorted.setMaxVertex(act.getMaxV()); |
|
71 |
Distorted.setMaxFragment(act.getMaxF()); |
|
71 | 72 |
} |
72 | 73 |
|
73 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/check/CheckSurfaceView.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
class CheckSurfaceView extends GLSurfaceView |
30 | 30 |
{ |
31 |
private CheckRenderer renderer; |
|
32 |
|
|
33 | 31 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
34 | 32 |
|
35 | 33 |
public CheckSurfaceView(Context c, AttributeSet attrs) |
... | ... | |
45 | 43 |
setEGLConfigChooser(8, 8, 8, 8, 16, 0); |
46 | 44 |
} |
47 | 45 |
|
48 |
renderer = new CheckRenderer(this); |
|
46 |
CheckRenderer renderer = new CheckRenderer(this);
|
|
49 | 47 |
setRenderer(renderer); |
50 | 48 |
} |
51 | 49 |
} |
Also available in: Unified diff
Remove unneeded 'statics' from the 'Check' app