Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: mojo/examples/sample_app/spinning_cube.h

Issue 61423003: Add a SpinningCube to Mojo's sample_app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows!!!! Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/examples/sample_app/DEPS ('k') | mojo/examples/sample_app/spinning_cube.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/sample_app/spinning_cube.h
diff --git a/mojo/examples/sample_app/spinning_cube.h b/mojo/examples/sample_app/spinning_cube.h
new file mode 100644
index 0000000000000000000000000000000000000000..b1a860c7bc6d0a110458ed6f2de23c86749ddd71
--- /dev/null
+++ b/mojo/examples/sample_app/spinning_cube.h
@@ -0,0 +1,44 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_
+#define MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_
+
+#include "base/memory/scoped_ptr.h"
+
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}
+
+namespace mojo {
+namespace examples {
+
+class SpinningCube {
+ public:
+ SpinningCube();
+ ~SpinningCube();
+
+ void BindTo(gpu::gles2::GLES2Interface* gl,
+ int width,
+ int height);
+ void OnGLContextLost();
+
+ void Update(float delta_time);
+ void Draw();
+
+ private:
+ class GLState;
+
+ gpu::gles2::GLES2Interface* gl_;
+ int width_;
+ int height_;
+ scoped_ptr<GLState> state_;
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_
« no previous file with comments | « mojo/examples/sample_app/DEPS ('k') | mojo/examples/sample_app/spinning_cube.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698