Revision 061449ed
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/earth/EarthRenderer.java | ||
---|---|---|
62 | 62 |
|
63 | 63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
64 | 64 |
|
65 |
class EarthRenderer implements GLSurfaceView.Renderer |
|
65 |
class EarthRenderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener
|
|
66 | 66 |
{ |
67 | 67 |
private static final float RADIUS_V= 1.0f/ 8; |
68 | 68 |
private static final float RADIUS_F= 1.0f/15; |
... | ... | |
281 | 281 |
DistortedLibrary.setMax(EffectType.VERTEX , MAX_EFF); |
282 | 282 |
DistortedLibrary.setMax(EffectType.FRAGMENT, MAX_EFF); |
283 | 283 |
|
284 |
try
|
|
285 |
{
|
|
286 |
DistortedLibrary.onCreate(mView.getContext()); |
|
287 |
}
|
|
288 |
catch(Exception ex) |
|
289 |
{
|
|
290 |
android.util.Log.e("Earth", ex.getMessage() );
|
|
291 |
}
|
|
284 |
DistortedLibrary.onCreate(mView.getContext(), this);
|
|
285 |
}
|
|
286 |
|
|
287 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
288 |
|
|
289 |
public void distortedException(Exception ex)
|
|
290 |
{
|
|
291 |
android.util.Log.e("Earth", ex.getMessage() );
|
|
292 | 292 |
} |
293 | 293 |
} |
Also available in: Unified diff
Only compile the Full, Normal & OIT programs when they are actually needed.