Revision 061449ed
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/listener/ListenerRenderer.java | ||
---|---|---|
48 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
49 | 49 |
// Show how to use the setMax, notifyWhenFinished / effectFinished APIs |
50 | 50 |
|
51 |
class ListenerRenderer implements GLSurfaceView.Renderer,EffectListener
|
|
51 |
class ListenerRenderer implements GLSurfaceView.Renderer, EffectListener, DistortedLibrary.ExceptionListener
|
|
52 | 52 |
{ |
53 | 53 |
private final int NUM_CONCURRENT_BUBBLES = 12; |
54 | 54 |
|
... | ... | |
183 | 183 |
DistortedLibrary.setMax(EffectType.VERTEX,NUM_CONCURRENT_BUBBLES+1); |
184 | 184 |
VertexEffectDistort.enable(); |
185 | 185 |
|
186 |
try
|
|
187 |
{
|
|
188 |
DistortedLibrary.onCreate(mView.getContext()); |
|
189 |
}
|
|
190 |
catch(Exception ex) |
|
191 |
{
|
|
192 |
android.util.Log.e("Listener", ex.getMessage() );
|
|
193 |
}
|
|
186 |
DistortedLibrary.onCreate(mView.getContext(), this);
|
|
187 |
}
|
|
188 |
|
|
189 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
190 |
|
|
191 |
public void distortedException(Exception ex)
|
|
192 |
{
|
|
193 |
android.util.Log.e("Listener", ex.getMessage() );
|
|
194 | 194 |
} |
195 | 195 |
} |
Also available in: Unified diff
Only compile the Full, Normal & OIT programs when they are actually needed.