Revision 6637d0f2
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
---|---|---|
30 | 30 |
import org.distorted.library.DistortedNode; |
31 | 31 |
import org.distorted.library.DistortedScreen; |
32 | 32 |
import org.distorted.library.DistortedTexture; |
33 |
import org.distorted.library.EffectNames; |
|
33 | 34 |
import org.distorted.library.MeshFlat; |
34 | 35 |
import org.distorted.library.MeshObject; |
35 | 36 |
import org.distorted.library.EffectTypes; |
... | ... | |
276 | 277 |
mCenterTexture.setTexture(bitmapC); |
277 | 278 |
mRegionTexture.setTexture(bitmapR); |
278 | 279 |
|
280 |
EffectTypes type; |
|
281 |
|
|
282 |
for( EffectNames name : EffectNames.values() ) |
|
283 |
{ |
|
284 |
type = name.getType(); |
|
285 |
|
|
286 |
if( type== EffectTypes.VERTEX || type==EffectTypes.FRAGMENT ) |
|
287 |
{ |
|
288 |
DistortedEffects.enableEffect(name); |
|
289 |
} |
|
290 |
} |
|
291 |
|
|
279 | 292 |
try |
280 | 293 |
{ |
281 | 294 |
Distorted.onCreate(mView.getContext()); |
Also available in: Unified diff
Speed up shaders (both compilation and execution) by explicitly enabling only the needed effects.