Project

General

Profile

« Previous | Next » 

Revision 6eb5eec2

Added by Leszek Koltunski over 7 years ago

A Lot of fixes for the issues uncovered by Olimpic.

Still at least 1 known issue: sometimes, when we re-add a Surface, some garbage pops up on the screen for a brief split second. Visible in Olimpic.

View differences:

src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
48 48
class OlimpicRenderer implements GLSurfaceView.Renderer 
49 49
{
50 50
   private static final int LEAF_SIZE = 100;
51
   private static final int NUM_CIRCLES = 2;
52
   private static final int NUM_LEAVES  = 2;
51
   private static final int NUM_CIRCLES = 5;
52
   private static final int NUM_LEAVES  = 8;
53 53
   
54 54
   private GLSurfaceView mView;
55 55
   private DistortedNode mRoot;
......
66 66

  
67 67
   void pressed(int color, int number, boolean checked)
68 68
     {
69
     android.util.Log.d("Olimpic","Color: "+color+" number:"+number+" checked: "+checked);
70

  
71 69
     if( color>=0 && color<NUM_CIRCLES )
72 70
       {
73 71
       if( number==0 )
src/main/res/layout/fbolayout.xml
27 27
                android:id="@+id/deformDistortButton"
28 28
                android:layout_width="wrap_content"
29 29
                android:layout_height="wrap_content"
30
                android:checked="true"
30 31
                android:onClick="DepthYes"
31 32
                android:text="@string/DepthYes" />
32 33

  
......
34 35
                android:id="@+id/deformDeformButton"
35 36
                android:layout_width="wrap_content"
36 37
                android:layout_height="wrap_content"
37
                android:checked="true"
38 38
                android:onClick="DepthNo"
39 39
                android:text="@string/DepthNo" />
40 40

  
src/main/res/layout/olimpiclayout.xml
29 29
            android:orientation="horizontal"
30 30
            android:layout_width="match_parent"
31 31
            android:layout_height="0dp"
32
            android:background="@color/blue"
32 33
            android:layout_weight="0.5">
33 34

  
34 35
            <CheckBox
......
100 101
            android:orientation="horizontal"
101 102
            android:layout_width="match_parent"
102 103
            android:layout_height="0dp"
104
            android:background="@color/black"
103 105
            android:layout_weight="0.5">
104 106

  
105 107
            <CheckBox
......
171 173
            android:orientation="horizontal"
172 174
            android:layout_width="match_parent"
173 175
            android:layout_height="0dp"
176
            android:background="@color/red"
174 177
            android:layout_weight="0.5">
175 178

  
176 179
            <CheckBox
......
242 245
            android:orientation="horizontal"
243 246
            android:layout_width="match_parent"
244 247
            android:layout_height="0dp"
248
            android:background="@color/yellow"
245 249
            android:layout_weight="0.5">
246 250

  
247 251
            <CheckBox
......
313 317
            android:orientation="horizontal"
314 318
            android:layout_width="match_parent"
315 319
            android:layout_height="0dp"
320
            android:background="@color/green"
316 321
            android:layout_weight="0.5">
317 322

  
318 323
            <CheckBox
src/main/res/values/colors.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<resources>
3
<color name="blue">#ff0000ff</color>
4
<color name="black">#ff000000</color>
5
<color name="red">#ffff0000</color>
6
<color name="yellow">#ffffff00</color>
7
<color name="green">#ff00ff00</color>
8
</resources>

Also available in: Unified diff