OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_ |
| 6 #define MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 |
| 10 namespace gpu { |
| 11 namespace gles2 { |
| 12 class GLES2Interface; |
| 13 } |
| 14 } |
| 15 |
| 16 namespace mojo { |
| 17 namespace examples { |
| 18 |
| 19 class SpinningCube { |
| 20 public: |
| 21 SpinningCube(); |
| 22 ~SpinningCube(); |
| 23 |
| 24 void BindTo(gpu::gles2::GLES2Interface* gl, |
| 25 int width, |
| 26 int height); |
| 27 void OnGLContextLost(); |
| 28 |
| 29 void Update(float delta_time); |
| 30 void Draw(); |
| 31 |
| 32 private: |
| 33 class GLState; |
| 34 |
| 35 gpu::gles2::GLES2Interface* gl_; |
| 36 int width_; |
| 37 int height_; |
| 38 scoped_ptr<GLState> state_; |
| 39 }; |
| 40 |
| 41 } // namespace examples |
| 42 } // namespace mojo |
| 43 |
| 44 #endif // MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_ |
OLD | NEW |