Revision 8beaa293
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/feedback/FeedbackRenderer.java | ||
---|---|---|
21 | 21 |
|
22 | 22 |
import android.opengl.GLSurfaceView; |
23 | 23 |
|
24 |
import org.distorted.library.Distorted; |
|
25 |
|
|
24 | 26 |
import javax.microedition.khronos.egl.EGLConfig; |
25 | 27 |
import javax.microedition.khronos.opengles.GL10; |
26 | 28 |
|
... | ... | |
28 | 30 |
|
29 | 31 |
class FeedbackRenderer implements GLSurfaceView.Renderer |
30 | 32 |
{ |
31 |
|
|
33 |
private GLSurfaceView mView; |
|
34 |
private TransformFeedback mTF; |
|
32 | 35 |
|
33 | 36 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
34 | 37 |
|
35 | 38 |
FeedbackRenderer(GLSurfaceView v) |
36 | 39 |
{ |
37 |
|
|
40 |
mView = v; |
|
38 | 41 |
} |
39 | 42 |
|
40 | 43 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 44 |
|
42 | 45 |
public void onDrawFrame(GL10 glUnused) |
43 | 46 |
{ |
44 |
TransformFeedback tf = new TransformFeedback();
|
|
47 |
mTF.render();
|
|
45 | 48 |
} |
46 | 49 |
|
47 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
55 | 58 |
|
56 | 59 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
57 | 60 |
{ |
61 |
try |
|
62 |
{ |
|
63 |
Distorted.onCreate(mView.getContext()); |
|
64 |
} |
|
65 |
catch(Exception ex) |
|
66 |
{ |
|
67 |
android.util.Log.e("MonaLisa", ex.getMessage() ); |
|
68 |
} |
|
58 | 69 |
|
70 |
mTF = new TransformFeedback(mView.getContext()); |
|
59 | 71 |
} |
60 | 72 |
} |
Also available in: Unified diff
Progress with moving the Transform Feedback functionality from the APP to the library.