OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "examples/sample_app/gles2_client_impl.h" | 5 #include "examples/spinning_cube/gles2_client_impl.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 #include <math.h> | 9 #include <math.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
11 | 11 |
12 #include "gpu/command_buffer/client/gles2_interface.h" | 12 #include "gpu/command_buffer/client/gles2_interface.h" |
13 #include "mojo/public/c/gles2/gles2.h" | 13 #include "mojo/public/c/gles2/gles2.h" |
14 #include "mojo/public/cpp/environment/environment.h" | 14 #include "mojo/public/cpp/environment/environment.h" |
15 #include "mojo/public/cpp/utility/run_loop.h" | 15 #include "mojo/public/cpp/utility/run_loop.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 float delta = static_cast<float>(offset) / 1000000.; | 131 float delta = static_cast<float>(offset) / 1000000.; |
132 last_time_ = now; | 132 last_time_ = now; |
133 cube_.UpdateForTimeDelta(delta); | 133 cube_.UpdateForTimeDelta(delta); |
134 cube_.Draw(); | 134 cube_.Draw(); |
135 | 135 |
136 MojoGLES2SwapBuffers(); | 136 MojoGLES2SwapBuffers(); |
137 WantToDraw(); | 137 WantToDraw(); |
138 } | 138 } |
139 | 139 |
140 } // namespace examples | 140 } // namespace examples |
OLD | NEW |