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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_renderer.h

Issue 2795793002: Implementation of elbow model for the controller position and rotation. (Closed)
Patch Set: Created 3 years, 9 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
Index: chrome/browser/android/vr_shell/vr_shell_renderer.h
diff --git a/chrome/browser/android/vr_shell/vr_shell_renderer.h b/chrome/browser/android/vr_shell/vr_shell_renderer.h
index 81811d3b458a5e3d2b96ec4eb93b3ff02c345437..2fb4b7262d069984b87b5d1768fe8e05e2b2774c 100644
--- a/chrome/browser/android/vr_shell/vr_shell_renderer.h
+++ b/chrome/browser/android/vr_shell/vr_shell_renderer.h
@@ -152,7 +152,7 @@ class LaserRenderer : public BaseQuadRenderer {
LaserRenderer();
~LaserRenderer() override;
- void Draw(const gvr::Mat4f& view_proj_matrix);
+ void Draw(float opacity, const gvr::Mat4f& view_proj_matrix);
private:
GLuint model_view_proj_matrix_handle_;
@@ -161,6 +161,7 @@ class LaserRenderer : public BaseQuadRenderer {
GLuint color_handle_;
GLuint fade_point_handle_;
GLuint fade_end_handle_;
+ GLuint opacity_handle_;
DISALLOW_COPY_AND_ASSIGN(LaserRenderer);
};
@@ -171,12 +172,15 @@ class ControllerRenderer : public BaseRenderer {
~ControllerRenderer() override;
void SetUp(std::unique_ptr<VrControllerModel> model);
- void Draw(VrControllerModel::State state, const gvr::Mat4f& view_proj_matrix);
+ void Draw(VrControllerModel::State state,
+ float opacity,
+ const gvr::Mat4f& view_proj_matrix);
bool IsSetUp() const { return setup_; }
private:
GLuint model_view_proj_matrix_handle_;
GLuint tex_uniform_handle_;
+ GLuint opacity_handle_;
GLuint indices_buffer_ = 0;
GLuint vertex_buffer_ = 0;
GLint position_components_ = 0;

Powered by Google App Engine
This is Rietveld 408576698