Commit 169b710
committed
Fix bad custom animation example
The custom animation example suggests that a stack-allocated
AnimationImplementation variable can be used, but this is incorrect.
The variable is not copied and so must remain valid while the
animation runs.
But also, the animation variable should not be stack-allocated, as
this makes it difficult to destroy it later.
Rework the example to use global variables for the animation and
implementation.
Signed-off-by: Lincoln Ramsay <[email protected]>1 parent 97a39c6 commit 169b710
1 file changed
+22
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
178 | 188 | | |
179 | 189 | | |
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
188 | 198 | | |
189 | 199 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
196 | 203 | | |
197 | 204 | | |
198 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
199 | 211 | | |
200 | 212 | | |
201 | 213 | | |
| |||
0 commit comments