Revision 061449ed
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/rubik/RubikRenderer.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
34 | 34 |
|
35 |
class RubikRenderer implements GLSurfaceView.Renderer, EffectListener |
|
35 |
class RubikRenderer implements GLSurfaceView.Renderer, EffectListener, DistortedLibrary.ExceptionListener
|
|
36 | 36 |
{ |
37 | 37 |
private static final float CUBE_SCREEN_RATIO = 0.5f; |
38 | 38 |
private static final float CAMERA_DISTANCE = 0.6f; // 0.6 of the length of max(scrHeight,scrWidth) |
... | ... | |
111 | 111 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
112 | 112 |
{ |
113 | 113 |
createNextCube(); |
114 |
|
|
115 | 114 |
VertexEffectSink.enable(); |
115 |
DistortedLibrary.onCreate(mView.getContext(), this); |
|
116 |
} |
|
116 | 117 |
|
117 |
try |
|
118 |
{ |
|
119 |
DistortedLibrary.onCreate(mView.getContext()); |
|
120 |
} |
|
121 |
catch(Exception ex) |
|
122 |
{ |
|
123 |
android.util.Log.e("Rubik", ex.getMessage() ); |
|
124 |
} |
|
118 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
119 |
|
|
120 |
public void distortedException(Exception ex) |
|
121 |
{ |
|
122 |
android.util.Log.e("Rubik", ex.getMessage() ); |
|
125 | 123 |
} |
126 | 124 |
|
127 | 125 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Only compile the Full, Normal & OIT programs when they are actually needed.