Project

General

Profile

« Previous | Next » 

Revision ed1c0b33

Added by Leszek Koltunski almost 8 years ago

Switch to sending a Context (rather than a GLSurfaceView) to the library.

View differences:

src/main/java/org/distorted/examples/bean/BeanRenderer.java
130 130
      
131 131
      try
132 132
        {
133
        Distorted.onSurfaceCreated(mView);
133
        Distorted.onSurfaceCreated(mView.getContext());
134 134
        }
135 135
      catch(Exception ex)
136 136
        {
src/main/java/org/distorted/examples/check/CheckRenderer.java
113 113
      
114 114
      try
115 115
        {
116
        Distorted.onSurfaceCreated(mView);
116
        Distorted.onSurfaceCreated(mView.getContext());
117 117
        }
118 118
      catch(Exception ex)
119 119
        {
src/main/java/org/distorted/examples/cubes/CubesRenderer.java
125 125
      
126 126
      try
127 127
        {
128
        Distorted.onSurfaceCreated(mView);
128
        Distorted.onSurfaceCreated(mView.getContext());
129 129
        }
130 130
      catch(Exception ex)
131 131
        {
src/main/java/org/distorted/examples/deform/DeformRenderer.java
152 152
      {  
153 153
      try
154 154
        {
155
        Distorted.onSurfaceCreated(mView);
155
        Distorted.onSurfaceCreated(mView.getContext());
156 156
        }
157 157
      catch(Exception ex)
158 158
        {
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
146 146
      
147 147
      try
148 148
        {
149
        Distorted.onSurfaceCreated(mView);
149
        Distorted.onSurfaceCreated(mView.getContext());
150 150
        }
151 151
      catch(Exception ex)
152 152
        {
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java
144 144
      
145 145
      try
146 146
        {
147
        Distorted.onSurfaceCreated(mView);
147
        Distorted.onSurfaceCreated(mView.getContext());
148 148
        }
149 149
      catch(Exception ex)
150 150
        {
151
        android.util.Log.e("DifferentEffectsRenderer", ex.getMessage() );
151
        android.util.Log.e("DifferentEffects", ex.getMessage() );
152 152
        }
153 153
      }
154 154
}
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
159 159
      
160 160
      try
161 161
        {
162
        Distorted.onSurfaceCreated(mView);
162
        Distorted.onSurfaceCreated(mView.getContext());
163 163
        }
164 164
      catch(Exception ex)
165 165
        {
src/main/java/org/distorted/examples/fbo/FBORenderer.java
113 113
      
114 114
      try
115 115
        {
116
        Distorted.onSurfaceCreated(mView);
116
        Distorted.onSurfaceCreated(mView.getContext());
117 117
        }
118 118
      catch(Exception ex)
119 119
        {
src/main/java/org/distorted/examples/fov/FOVRenderer.java
65 65
      {  
66 66
      try
67 67
        {
68
        Distorted.onSurfaceCreated(mView);
68
        Distorted.onSurfaceCreated(mView.getContext());
69 69
        }
70 70
      catch(Exception ex)
71 71
        {
src/main/java/org/distorted/examples/girl/GirlRenderer.java
201 201
      
202 202
      try
203 203
        {
204
        Distorted.onSurfaceCreated(mView);
204
        Distorted.onSurfaceCreated(mView.getContext());
205 205
        }
206 206
      catch(Exception ex)
207 207
        {
src/main/java/org/distorted/examples/interpolator/InterpolatorRenderer.java
53 53
     
54 54
     try
55 55
        {
56
        Distorted.onSurfaceCreated(mView);
56
        Distorted.onSurfaceCreated(mView.getContext());
57 57
        }
58 58
      catch(Exception ex)
59 59
        {
src/main/java/org/distorted/examples/listener/ListenerRenderer.java
134 134
      
135 135
      try
136 136
        {
137
        Distorted.onSurfaceCreated(mView);
137
        Distorted.onSurfaceCreated(mView.getContext());
138 138
        }
139 139
      catch(Exception ex)
140 140
        {
src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java
81 81
      
82 82
      try
83 83
        {
84
        Distorted.onSurfaceCreated(mView);
84
        Distorted.onSurfaceCreated(mView.getContext());
85 85
        }
86 86
      catch(Exception ex)
87 87
        {
src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java
107 107
      
108 108
      try
109 109
        {
110
        Distorted.onSurfaceCreated(mView);
110
        Distorted.onSurfaceCreated(mView.getContext());
111 111
        }
112 112
      catch(Exception ex)
113 113
        {
src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
68 68
      
69 69
     try
70 70
        {
71
        Distorted.onSurfaceCreated(mView);
71
        Distorted.onSurfaceCreated(mView.getContext());
72 72
        }
73 73
      catch(Exception ex)
74 74
        {
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
147 147
      
148 148
      try
149 149
        {
150
        Distorted.onSurfaceCreated(mView);
150
        Distorted.onSurfaceCreated(mView.getContext());
151 151
        }
152 152
      catch(Exception ex)
153 153
        {
154
        android.util.Log.e("DifferentEffectsRenderer", ex.getMessage() );
154
        android.util.Log.e("Olympic", ex.getMessage() );
155 155
        }
156 156
      }
157 157
 
src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
118 118
      
119 119
      try
120 120
        {
121
        Distorted.onSurfaceCreated(mView);
121
        Distorted.onSurfaceCreated(mView.getContext());
122 122
        }
123 123
      catch(Exception ex)
124 124
        {
src/main/java/org/distorted/examples/scratchpad/ScratchpadRenderer.java
63 63
          
64 64
     try
65 65
       {
66
       Distorted.onSurfaceCreated(mView);
66
       Distorted.onSurfaceCreated(mView.getContext());
67 67
       }
68 68
     catch(Exception ex)
69 69
       {
70
       android.util.Log.e("Renderer", ex.getMessage() );
70
       android.util.Log.e("Scratchpad", ex.getMessage() );
71 71
       }
72 72
     }
73 73

  
src/main/java/org/distorted/examples/sink/SinkRenderer.java
101 101
      
102 102
      try
103 103
        {
104
        Distorted.onSurfaceCreated(mView);
104
        Distorted.onSurfaceCreated(mView.getContext());
105 105
        }
106 106
      catch(Exception ex)
107 107
        {
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
124 124
         
125 125
      try
126 126
        {
127
        Distorted.onSurfaceCreated(mView);
127
        Distorted.onSurfaceCreated(mView.getContext());
128 128
        }
129 129
      catch(Exception ex)
130 130
        {
......
172 172
        mRoot.attach(mStars[i]);
173 173
        }
174 174
      
175
      float scale = (float) (0.5f*w/mGFFA.getWidth());
175
      float scale = (0.5f*w/mGFFA.getWidth());
176 176
      
177 177
      Interpolator1D di = new Interpolator1D();
178 178
      di.setDuration(6000);
......
277 277
    
278 278
      if( len>0 && str.charAt(len-1) == ' ' ) numspaces--;
279 279

  
280
      float left=x,w = (numspaces>0 ? (float)(length-paint.measureText(str))/numspaces : 0);
280
      float left=x,w = (numspaces>0 ? (length-paint.measureText(str))/numspaces : 0);
281 281
      String tmp;
282 282
      int begin,end=0;
283 283

  
src/main/res/values/strings.xml
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<resources>    
3
    <string name="app_name">Distorted Android Examples</string>
3
    <string name="app_name">Distorted Examples</string>
4 4
    <string name="toc">Table of Contents</string>
5
    <string name="tocHeader">Welcome to the Distorted Android Examples!\nPlease take a look at: http://distorted.org/</string>
5
    <string name="tocHeader">Welcome to the Distorted Examples!\nPlease take a look at: http://distorted.org/</string>
6 6
    
7 7
    <string name="continu">Continue</string>
8 8
    <string name="rows">Rows</string>

Also available in: Unified diff