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

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

Issue 297113002: Change the color of the spinning cube on click. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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/gles2_client_impl.cc ('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
index 9cd78b8f899ca8bbe1e7b1ba858dd012b7962a4e..9f7cdc427a687e5365e337139f9c5764acfcc955 100644
--- a/mojo/examples/sample_app/spinning_cube.h
+++ b/mojo/examples/sample_app/spinning_cube.h
@@ -19,6 +19,11 @@ class SpinningCube {
void Init(uint32_t width, uint32_t height);
void set_direction(int direction) { direction_ = direction; }
+ void set_color(float r, float g, float b) {
+ color_[0] = r;
+ color_[1] = g;
+ color_[2] = b;
+ }
void SetFlingMultiplier(float drag_distance, float drag_time);
void UpdateForTimeDelta(float delta_time);
void UpdateForDragDistance(float distance);
@@ -37,6 +42,7 @@ class SpinningCube {
scoped_ptr<GLState> state_;
float fling_multiplier_;
int direction_;
+ float color_[3];
};
} // namespace examples
« no previous file with comments | « mojo/examples/sample_app/gles2_client_impl.cc ('k') | mojo/examples/sample_app/spinning_cube.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698