Revision 061449ed
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
50 | 50 |
|
51 |
class DifferentBitmapsRenderer implements GLSurfaceView.Renderer
|
|
51 |
class DifferentBitmapsRenderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener
|
|
52 | 52 |
{ |
53 | 53 |
private static final int[] bitmap = { R.raw.dog, R.raw.face, R.raw.cat }; |
54 | 54 |
private static final int NUM = bitmap.length; |
... | ... | |
168 | 168 |
VertexEffectSink.enable(); |
169 | 169 |
VertexEffectDistort.enable(); |
170 | 170 |
|
171 |
try
|
|
172 |
{
|
|
173 |
DistortedLibrary.onCreate(mView.getContext()); |
|
174 |
}
|
|
175 |
catch(Exception ex) |
|
176 |
{
|
|
177 |
android.util.Log.e("Renderer", ex.getMessage() );
|
|
178 |
}
|
|
171 |
DistortedLibrary.onCreate(mView.getContext(),this);
|
|
172 |
}
|
|
173 |
|
|
174 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
175 |
|
|
176 |
public void distortedException(Exception ex)
|
|
177 |
{
|
|
178 |
android.util.Log.e("DifferentBitmaps", ex.getMessage() );
|
|
179 | 179 |
} |
180 | 180 |
|
181 | 181 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Only compile the Full, Normal & OIT programs when they are actually needed.