Revision 14bd7976
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/main/RubikRenderer.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
import org.distorted.effects.BaseEffect; |
26 | 26 |
import org.distorted.library.effect.EffectType; |
27 |
import org.distorted.library.effect.VertexEffectSink; |
|
28 | 27 |
import org.distorted.library.main.DistortedLibrary; |
29 | 28 |
import org.distorted.library.main.DistortedScreen; |
30 | 29 |
|
... | ... | |
44 | 43 |
|
45 | 44 |
RubikRenderer(RubikSurfaceView v) |
46 | 45 |
{ |
46 |
final float BRIGHTNESS = 0.1f; |
|
47 |
|
|
47 | 48 |
mView = v; |
48 | 49 |
mScreen = new DistortedScreen(); |
50 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
51 |
|
|
52 |
mScreen.showFPS(); |
|
49 | 53 |
} |
50 | 54 |
|
51 | 55 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
74 | 78 |
@Override |
75 | 79 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
76 | 80 |
{ |
77 |
DistortedLibrary.setMax(EffectType.VERTEX,12); |
|
78 |
VertexEffectSink.enable(); |
|
81 |
DistortedLibrary.setMax(EffectType.VERTEX,15); |
|
79 | 82 |
BaseEffect.Type.enableEffects(); |
80 | 83 |
|
81 | 84 |
try |
Also available in: Unified diff
1) Cube: convert it to the latest library. Main difference: objects are rendered better, individual cubits have rounded corners.
2) Examples: some adjustments to MeshJoin & Predeform
3) Library: fix a bug in main_vertex_shader's 'degree' function, which didn't work proprely in case of a vertex which was exactly at the center (i.e. vector PS was zero)