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

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: Fix typo 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
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..7190004d3e2e8f28af0cd6d8a699060b05072e08
--- /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:
+ explicit SpinningCube(gpu::gles2::GLES2Interface* gl,
+ int width,
+ int height);
+ virtual ~SpinningCube();
+
+ void Update(float delta_time);
+ void Draw();
jamesr 2013/11/06 01:42:45 what do you expect will call these functions?
abarth-chromium 2013/11/06 02:25:10 Probably something in sample_app.cc. Once we have
+
+ private:
+ class GLState;
+
+ void Initialize();
+
+ gpu::gles2::GLES2Interface* gl_;
jamesr 2013/11/06 01:42:45 does this have some sort of ownership stake in the
abarth-chromium 2013/11/06 02:25:10 We're probably going to end up calling static C fu
+ int width_;
+ int height_;
+
+ scoped_ptr<GLState> state_;
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_SAMPLE_APP_SPINNING_CUBE_H_

Powered by Google App Engine
This is Rietveld 408576698