Revision e7a4ef16
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java | ||
---|---|---|
57 | 57 |
|
58 | 58 |
public void onDrawFrame(GL10 glUnused) |
59 | 59 |
{ |
60 |
GLES20.glClearColor(0.2f, 0.2f, 0.2f, 1.0f); |
|
61 | 60 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
62 |
|
|
63 | 61 |
mObject.draw(System.currentTimeMillis()); |
64 | 62 |
} |
65 | 63 |
|
... | ... | |
90 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
91 | 89 |
|
92 | 90 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
93 |
{ |
|
91 |
{ |
|
92 |
GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f); |
|
93 |
|
|
94 | 94 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.face); |
95 | 95 |
Bitmap bitmap; |
96 | 96 |
|
src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRendererPicker.java | ||
---|---|---|
73 | 73 |
|
74 | 74 |
@Override public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
75 | 75 |
{ |
76 |
GLES20.glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
|
|
76 |
GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
|
|
77 | 77 |
|
78 | 78 |
final float eyeX = 0.0f; |
79 | 79 |
final float eyeY = 0.0f; |
src/main/java/org/distorted/examples/bean/BeanRenderer.java | ||
---|---|---|
88 | 88 |
|
89 | 89 |
public void onDrawFrame(GL10 glUnused) |
90 | 90 |
{ |
91 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
92 | 91 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
93 |
|
|
94 | 92 |
mBean.draw(System.currentTimeMillis()); |
95 | 93 |
} |
96 | 94 |
|
... | ... | |
124 | 122 |
|
125 | 123 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
126 | 124 |
{ |
125 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
126 |
|
|
127 | 127 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.bean); |
128 | 128 |
Bitmap bitmap; |
129 | 129 |
|
src/main/java/org/distorted/examples/catanddog/CatAndDogRenderer.java | ||
---|---|---|
63 | 63 |
|
64 | 64 |
public void onDrawFrame(GL10 glUnused) |
65 | 65 |
{ |
66 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
67 | 66 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
68 |
|
|
69 | 67 |
catanddog.draw(System.currentTimeMillis()); |
70 | 68 |
} |
71 | 69 |
|
72 | 70 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
73 | 71 |
|
74 | 72 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
75 |
{ |
|
73 |
{ |
|
74 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
75 |
|
|
76 | 76 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.cat_and_dog); |
77 | 77 |
Bitmap bitmap; |
78 | 78 |
|
src/main/java/org/distorted/examples/check/CheckRenderer.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
class CheckRenderer implements GLSurfaceView.Renderer |
53 | 53 |
{ |
54 |
private static final String TAG = "CheckRenderer"; |
|
55 | 54 |
private static String compilationResult; |
56 | 55 |
private static String compilationTitle; |
57 | 56 |
|
... | ... | |
75 | 74 |
|
76 | 75 |
public void onDrawFrame(GL10 glUnused) |
77 | 76 |
{ |
78 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
79 | 77 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
80 |
|
|
81 | 78 |
mSuccess.draw(System.currentTimeMillis()); |
82 | 79 |
} |
83 | 80 |
|
... | ... | |
111 | 108 |
|
112 | 109 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
113 | 110 |
{ |
111 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
112 |
|
|
114 | 113 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.success); |
115 | 114 |
Bitmap bitmap; |
116 | 115 |
|
... | ... | |
146 | 145 |
|
147 | 146 |
if( swirlEffectID<0 ) |
148 | 147 |
{ |
149 |
Log.e(TAG, "Failed to add Swirl effect!");
|
|
148 |
Log.e("Check", "Failed to add Swirl effect!");
|
|
150 | 149 |
} |
151 | 150 |
|
152 | 151 |
Dynamic3D dDeform = new Dynamic3D(2000,0.0f); |
... | ... | |
157 | 156 |
|
158 | 157 |
if( deformEffectID<0 ) |
159 | 158 |
{ |
160 |
Log.e(TAG, "Failed to add Deform effect!");
|
|
159 |
Log.e("Check", "Failed to add Deform effect!");
|
|
161 | 160 |
} |
162 | 161 |
|
163 | 162 |
// Now try adding 1 Fragment Effect. Likewise, will fail if maxFragmentEffects is <1. |
... | ... | |
170 | 169 |
|
171 | 170 |
if( chromaEffectID<0 ) |
172 | 171 |
{ |
173 |
Log.e(TAG, "Failed to add Chroma effect!");
|
|
172 |
Log.e("Check", "Failed to add Chroma effect!");
|
|
174 | 173 |
} |
175 | 174 |
|
176 | 175 |
try |
src/main/java/org/distorted/examples/cubes/CubesRenderer.java | ||
---|---|---|
77 | 77 |
|
78 | 78 |
public void onDrawFrame(GL10 glUnused) |
79 | 79 |
{ |
80 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
81 | 80 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
82 |
|
|
83 | 81 |
mObject.draw(System.currentTimeMillis()); |
84 | 82 |
} |
85 | 83 |
|
... | ... | |
115 | 113 |
|
116 | 114 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
117 | 115 |
{ |
116 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
117 |
|
|
118 | 118 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.grid); |
119 | 119 |
Bitmap bitmap; |
120 | 120 |
|
src/main/java/org/distorted/examples/deform/DeformRenderer.java | ||
---|---|---|
165 | 165 |
|
166 | 166 |
public void onDrawFrame(GL10 glUnused) |
167 | 167 |
{ |
168 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
169 | 168 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
170 | 169 |
|
171 | 170 |
long time = System.currentTimeMillis(); |
... | ... | |
210 | 209 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
211 | 210 |
|
212 | 211 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
213 |
{ |
|
212 |
{ |
|
213 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
214 |
|
|
214 | 215 |
try |
215 | 216 |
{ |
216 | 217 |
Distorted.onSurfaceCreated(mView.getContext()); |
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java | ||
---|---|---|
93 | 93 |
|
94 | 94 |
public void onDrawFrame(GL10 glUnused) |
95 | 95 |
{ |
96 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
97 | 96 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
98 | 97 |
|
99 | 98 |
long time = System.currentTimeMillis(); |
... | ... | |
140 | 139 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
141 | 140 |
|
142 | 141 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
143 |
{ |
|
142 |
{ |
|
143 |
GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); |
|
144 |
|
|
144 | 145 |
Bitmap bitmap0= readBitmap(R.raw.dog); |
145 | 146 |
Bitmap bitmap1= readBitmap(R.raw.face); |
146 | 147 |
Bitmap bitmap2= readBitmap(R.raw.cat); |
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java | ||
---|---|---|
79 | 79 |
|
80 | 80 |
public void onDrawFrame(GL10 glUnused) |
81 | 81 |
{ |
82 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
83 | 82 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
84 | 83 |
|
85 | 84 |
long time = System.currentTimeMillis(); |
... | ... | |
127 | 126 |
|
128 | 127 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
129 | 128 |
{ |
129 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
130 |
|
|
130 | 131 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog); |
131 | 132 |
Bitmap bitmap; |
132 | 133 |
|
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
---|---|---|
119 | 119 |
|
120 | 120 |
public void onDrawFrame(GL10 glUnused) |
121 | 121 |
{ |
122 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
123 | 122 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
124 | 123 |
|
125 | 124 |
long time = System.currentTimeMillis(); |
... | ... | |
208 | 207 |
|
209 | 208 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
210 | 209 |
{ |
210 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
211 |
|
|
211 | 212 |
Effects3DActivity act = (Effects3DActivity)mView.getContext(); |
212 | 213 |
|
213 | 214 |
InputStream is1 = act.getResources().openRawResource(R.raw.water); |
src/main/java/org/distorted/examples/fbo/FBORenderer.java | ||
---|---|---|
62 | 62 |
|
63 | 63 |
public void onDrawFrame(GL10 glUnused) |
64 | 64 |
{ |
65 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
66 | 65 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
67 |
|
|
68 | 66 |
mRoot.draw(System.currentTimeMillis()); |
69 | 67 |
} |
70 | 68 |
|
... | ... | |
98 | 96 |
|
99 | 97 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
100 | 98 |
{ |
99 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
100 |
|
|
101 | 101 |
InputStream is1 = mView.getContext().getResources().openRawResource(R.raw.monalisa); |
102 | 102 |
InputStream is2 = mView.getContext().getResources().openRawResource(R.raw.fbo); |
103 | 103 |
|
src/main/java/org/distorted/examples/flag/FlagRenderer.java | ||
---|---|---|
134 | 134 |
|
135 | 135 |
public void onDrawFrame(GL10 glUnused) |
136 | 136 |
{ |
137 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
138 | 137 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
139 |
|
|
140 | 138 |
mObject.draw(System.currentTimeMillis()); |
141 | 139 |
} |
142 | 140 |
|
... | ... | |
172 | 170 |
|
173 | 171 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
174 | 172 |
{ |
173 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
174 |
|
|
175 | 175 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.iceland); |
176 | 176 |
Bitmap bitmap; |
177 | 177 |
|
src/main/java/org/distorted/examples/fov/FOVRenderer.java | ||
---|---|---|
62 | 62 |
|
63 | 63 |
public void onDrawFrame(GL10 glUnused) |
64 | 64 |
{ |
65 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
66 | 65 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
67 |
|
|
68 | 66 |
fov.draw(System.currentTimeMillis()); |
69 | 67 |
} |
70 | 68 |
|
... | ... | |
79 | 77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
80 | 78 |
|
81 | 79 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
82 |
{ |
|
80 |
{ |
|
81 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
82 |
|
|
83 | 83 |
try |
84 | 84 |
{ |
85 | 85 |
Distorted.onSurfaceCreated(mView.getContext()); |
src/main/java/org/distorted/examples/girl/GirlRenderer.java | ||
---|---|---|
151 | 151 |
|
152 | 152 |
public void onDrawFrame(GL10 glUnused) |
153 | 153 |
{ |
154 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
155 | 154 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
156 |
|
|
157 | 155 |
mGirl.draw(System.currentTimeMillis()); |
158 | 156 |
} |
159 | 157 |
|
... | ... | |
186 | 184 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
187 | 185 |
|
188 | 186 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
189 |
{ |
|
187 |
{ |
|
188 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
189 |
|
|
190 | 190 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.girl); |
191 | 191 |
Bitmap bitmap; |
192 | 192 |
|
src/main/java/org/distorted/examples/listener/ListenerRenderer.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
class ListenerRenderer implements GLSurfaceView.Renderer,EffectListener |
50 | 50 |
{ |
51 |
private final int NUM_BUBBLES = 12; |
|
52 |
|
|
51 | 53 |
private GLSurfaceView mView; |
52 | 54 |
private DistortedBitmap water; |
53 | 55 |
private int bmpHeight, bmpWidth; |
54 | 56 |
private Random mRnd; |
55 |
|
|
56 |
private final int NUM_BUBBLES = 12; |
|
57 |
|
|
57 |
|
|
58 | 58 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
59 | 59 |
|
60 |
public ListenerRenderer(GLSurfaceView v)
|
|
60 |
ListenerRenderer(GLSurfaceView v)
|
|
61 | 61 |
{ |
62 | 62 |
Distorted.setMaxVertex(NUM_BUBBLES); |
63 | 63 |
mView = v; |
... | ... | |
96 | 96 |
|
97 | 97 |
public void onDrawFrame(GL10 glUnused) |
98 | 98 |
{ |
99 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
100 | 99 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
101 |
|
|
102 | 100 |
water.draw(System.currentTimeMillis()); |
103 | 101 |
} |
104 | 102 |
|
... | ... | |
132 | 130 |
|
133 | 131 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
134 | 132 |
{ |
133 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
134 |
|
|
135 | 135 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.water); |
136 | 136 |
Bitmap bitmap; |
137 | 137 |
|
src/main/java/org/distorted/examples/matrix3d/Matrix3DRenderer.java | ||
---|---|---|
138 | 138 |
|
139 | 139 |
public void onDrawFrame(GL10 glUnused) |
140 | 140 |
{ |
141 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
142 | 141 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
143 |
|
|
144 | 142 |
mCube.draw(System.currentTimeMillis()); |
145 | 143 |
} |
146 | 144 |
|
... | ... | |
157 | 155 |
|
158 | 156 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
159 | 157 |
{ |
158 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
159 |
|
|
160 | 160 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.grid); |
161 | 161 |
Bitmap bitmap; |
162 | 162 |
|
src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java | ||
---|---|---|
74 | 74 |
|
75 | 75 |
public void onDrawFrame(GL10 glUnused) |
76 | 76 |
{ |
77 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
78 | 77 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
79 |
|
|
80 | 78 |
monaLisa.draw(System.currentTimeMillis()); |
81 | 79 |
} |
82 | 80 |
|
... | ... | |
108 | 106 |
|
109 | 107 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
110 | 108 |
{ |
109 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
110 |
|
|
111 | 111 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.monalisa); |
112 | 112 |
Bitmap bitmap; |
113 | 113 |
|
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java | ||
---|---|---|
46 | 46 |
{ |
47 | 47 |
private static final int LEAF_SIZE = 100; |
48 | 48 |
private static final int NUM_CIRCLES = 5; |
49 |
private static final int NUM_LEAVES = 8;
|
|
49 |
private static final int NUM_LEAVES = 8;
|
|
50 | 50 |
|
51 | 51 |
private GLSurfaceView mView; |
52 | 52 |
private DistortedNode mScreen; |
... | ... | |
108 | 108 |
|
109 | 109 |
public void onDrawFrame(GL10 glUnused) |
110 | 110 |
{ |
111 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
112 | 111 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
113 |
|
|
114 | 112 |
mScreen.draw(System.currentTimeMillis()); |
115 | 113 |
} |
116 | 114 |
|
... | ... | |
148 | 146 |
|
149 | 147 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
150 | 148 |
{ |
149 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
150 |
|
|
151 | 151 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.leaf); |
152 | 152 |
Bitmap leaf; |
153 | 153 |
|
src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java | ||
---|---|---|
171 | 171 |
eglSurface = eglCore.createWindowSurface(surface); |
172 | 172 |
eglCore.makeCurrent(eglSurface); |
173 | 173 |
|
174 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
175 |
|
|
174 | 176 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.monalisa); |
175 | 177 |
Bitmap bmp; |
176 | 178 |
|
... | ... | |
244 | 246 |
|
245 | 247 |
eglCore.makeCurrent(eglSurface); |
246 | 248 |
|
247 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
248 | 249 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
249 | 250 |
monaLisa.draw(System.currentTimeMillis()); |
250 | 251 |
|
src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java | ||
---|---|---|
86 | 86 |
|
87 | 87 |
public void onDrawFrame(GL10 glUnused) |
88 | 88 |
{ |
89 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
90 | 89 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
91 |
|
|
92 | 90 |
mCube.draw(System.currentTimeMillis()); |
93 | 91 |
} |
94 | 92 |
|
... | ... | |
118 | 116 |
|
119 | 117 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
120 | 118 |
{ |
119 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
120 |
|
|
121 | 121 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.grid); |
122 | 122 |
Bitmap bitmap; |
123 | 123 |
|
src/main/java/org/distorted/examples/save/SaveRenderer.java | ||
---|---|---|
116 | 116 |
|
117 | 117 |
public void onDrawFrame(GL10 glUnused) |
118 | 118 |
{ |
119 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
120 | 119 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
121 | 120 |
|
122 | 121 |
mGirl.draw(System.currentTimeMillis()); |
... | ... | |
166 | 165 |
|
167 | 166 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
168 | 167 |
{ |
168 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
169 |
|
|
169 | 170 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.girl); |
170 | 171 |
Bitmap bitmap; |
171 | 172 |
|
src/main/java/org/distorted/examples/sink/SinkRenderer.java | ||
---|---|---|
53 | 53 |
|
54 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 55 |
|
56 |
public SinkRenderer(GLSurfaceView v)
|
|
56 |
SinkRenderer(GLSurfaceView v)
|
|
57 | 57 |
{ |
58 | 58 |
mView = v; |
59 | 59 |
|
... | ... | |
66 | 66 |
|
67 | 67 |
public void onDrawFrame(GL10 glUnused) |
68 | 68 |
{ |
69 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
70 | 69 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
71 |
|
|
72 | 70 |
sinkBmp.draw(System.currentTimeMillis()); |
73 | 71 |
} |
74 | 72 |
|
... | ... | |
102 | 100 |
|
103 | 101 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
104 | 102 |
{ |
103 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
104 |
|
|
105 | 105 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog); |
106 | 106 |
Bitmap bitmap; |
107 | 107 |
|
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
109 | 109 |
|
110 | 110 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
111 | 111 |
|
112 |
public StarWarsRenderer(GLSurfaceView v)
|
|
112 |
StarWarsRenderer(GLSurfaceView v)
|
|
113 | 113 |
{ |
114 | 114 |
mView = v; |
115 | 115 |
|
... | ... | |
120 | 120 |
|
121 | 121 |
public void onDrawFrame(GL10 glUnused) |
122 | 122 |
{ |
123 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
124 | 123 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
125 |
|
|
126 | 124 |
mRoot.draw(System.currentTimeMillis()); |
127 | 125 |
} |
128 | 126 |
|
... | ... | |
138 | 136 |
|
139 | 137 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
140 | 138 |
{ |
139 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
140 |
|
|
141 | 141 |
setupBitmaps(); |
142 | 142 |
|
143 | 143 |
try |
src/main/java/org/distorted/examples/wind/WindRenderer.java | ||
---|---|---|
73 | 73 |
|
74 | 74 |
public void onDrawFrame(GL10 glUnused) |
75 | 75 |
{ |
76 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
77 | 76 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); |
78 |
|
|
79 | 77 |
mObject.draw(System.currentTimeMillis()); |
80 | 78 |
} |
81 | 79 |
|
... | ... | |
104 | 102 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
105 | 103 |
|
106 | 104 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
107 |
{ |
|
105 |
{ |
|
106 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
|
107 |
|
|
108 | 108 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.iceland); |
109 | 109 |
Bitmap bitmap; |
110 | 110 |
|
Also available in: Unified diff
Minor stuff