Project

General

Profile

« Previous | Next » 

Revision ef0fd531

Added by Leszek Koltunski about 8 years ago

1. Workaround for th issue that my shitty Nexus 4 crashes while compiling the vertext shader (actually the wave function)
2. Improvements to the Dynamics app

View differences:

src/main/java/org/distorted/examples/flag/FlagRenderer.java
78 78
      mWaveDyn.add(mWaveSta2);
79 79
      mWaveDyn.setMode(Dynamic.MODE_JUMP);
80 80

  
81
      mWaveDyn.setNoise( new Static5D(0.1f, 0.1f, 0.1f, 0.1f, 0.1f) );
81
      //mWaveDyn.setNoise( new Static5D(0.1f, 0.1f, 0.1f, 0.1f, 0.1f) );
82 82

  
83 83
      mQuat1 = new Static4D(0,0,0,1);  // unity
84 84
      mQuat2 = new Static4D(0,0,0,1);  // quaternions
src/main/res/layout/dynamicslayout.xml
93 93
    <LinearLayout
94 94
        android:id="@+id/linearLayout1"
95 95
        android:layout_width="fill_parent"
96
        android:layout_height="80dp"
96
        android:layout_height="wrap_content"
97 97
        android:layout_gravity="center_vertical"
98
        android:gravity="center|fill_horizontal" >
98
        android:gravity="center|fill_horizontal"
99
        android:orientation="vertical">
99 100

  
100
        <TableLayout
101
        <TextView
102
            android:id="@+id/dynamicTextDuration"
101 103
            android:layout_width="wrap_content"
102
            android:layout_height="match_parent"
103
            android:layout_gravity="center_vertical"
104
            android:layout_height="wrap_content"
105
            android:layout_gravity="center_horizontal"
104 106
            android:layout_weight="15"
105
            android:gravity="center_vertical" >
107
            android:paddingLeft="10dp"
108
            android:text="@string/duration"
109
            android:textAppearance="?android:attr/textAppearanceMedium"
110
            android:textSize="12sp" />
111

  
112
        <SeekBar
113
            android:id="@+id/dynamicSeekDuration"
114
            android:layout_width="match_parent"
115
            android:layout_height="wrap_content"
116
            android:layout_weight="15"
117
            android:paddingLeft="5dp"
118
            android:paddingRight="10dp" />
106 119

  
107
            <TableRow
108
                android:id="@+id/tableRow1"
109
                android:layout_width="wrap_content"
120
        <TextView
121
            android:id="@+id/dynamicTextNoise"
122
            android:layout_width="wrap_content"
123
            android:layout_height="wrap_content"
124
            android:layout_gravity="center_horizontal"
125
            android:layout_weight="15"
126
            android:paddingLeft="10dp"
127
            android:text="@string/noise"
128
            android:textAppearance="?android:attr/textAppearanceMedium"
129
            android:textSize="12sp" />
130

  
131
        <LinearLayout
132
            android:orientation="horizontal"
133
            android:layout_width="match_parent"
134
            android:layout_height="match_parent"
135
            android:layout_weight="15">
136

  
137
            <SeekBar
138
                android:id="@+id/dynamicSeekNoise0"
139
                android:layout_width="match_parent"
110 140
                android:layout_height="wrap_content"
111
                android:layout_gravity="center_vertical"
112
                android:paddingBottom="5dp"
113
                android:paddingTop="5dp" >
114

  
115
                <TextView
116
                    android:id="@+id/dynamicTextDuration"
117
                    android:layout_width="wrap_content"
118
                    android:layout_height="wrap_content"
119
                    android:layout_gravity="center_vertical"
120
                    android:layout_weight="5"
121
                    android:paddingLeft="10dp"
122
                    android:text="@string/duration"
123
                    android:textAppearance="?android:attr/textAppearanceMedium"
124
                    android:textSize="12sp" />
125

  
126
                <SeekBar
127
                    android:id="@+id/dynamicSeekDuration"
128
                    android:layout_width="match_parent"
129
                    android:layout_height="wrap_content"
130
                    android:layout_weight="12"
131
                    android:paddingLeft="5dp"
132
                    android:paddingRight="10dp" />
133
            </TableRow>
134

  
135
            <TableRow
136
                android:id="@+id/tableRow2"
137
                android:layout_width="wrap_content"
141
                android:layout_weight="1"
142
                android:paddingLeft="5dp"
143
                android:paddingRight="10dp" />
144

  
145
            <SeekBar
146
                android:id="@+id/dynamicSeekNoise1"
147
                android:layout_width="match_parent"
148
                android:layout_height="wrap_content"
149
                android:layout_weight="1"
150
                android:paddingLeft="5dp"
151
                android:paddingRight="10dp" />
152

  
153
            <SeekBar
154
                android:id="@+id/dynamicSeekNoise2"
155
                android:layout_width="match_parent"
138 156
                android:layout_height="wrap_content"
139
                android:paddingBottom="5dp"
140
                android:paddingTop="5dp" >
141

  
142
                <TextView
143
                    android:id="@+id/dynamicTextNoise"
144
                    android:layout_width="wrap_content"
145
                    android:layout_height="wrap_content"
146
                    android:layout_gravity="center_vertical"
147
                    android:layout_weight="5"
148
                    android:paddingLeft="10dp"
149
                    android:text="@string/noise"
150
                    android:textAppearance="?android:attr/textAppearanceMedium"
151
                    android:textSize="12sp" />
152

  
153
                <SeekBar
154
                    android:id="@+id/dynamicSeekNoise0"
155
                    android:layout_width="match_parent"
156
                    android:layout_height="wrap_content"
157
                    android:layout_weight="12"
158
                    android:paddingLeft="5dp"
159
                    android:paddingRight="10dp" />
160
                <SeekBar
161
                    android:id="@+id/dynamicSeekNoise1"
162
                    android:layout_width="match_parent"
163
                    android:layout_height="wrap_content"
164
                    android:layout_weight="12"
165
                    android:paddingLeft="5dp"
166
                    android:paddingRight="10dp" />
167
                <SeekBar
168
                    android:id="@+id/dynamicSeekNoise2"
169
                    android:layout_width="match_parent"
170
                    android:layout_height="wrap_content"
171
                    android:layout_weight="12"
172
                    android:paddingLeft="5dp"
173
                    android:paddingRight="10dp" />
174
            </TableRow>
175
        </TableLayout>
157
                android:layout_weight="1"
158
                android:paddingLeft="5dp"
159
                android:paddingRight="10dp" />
160
        </LinearLayout>
161

  
176 162
    </LinearLayout>
177 163

  
178 164
</LinearLayout>

Also available in: Unified diff