| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 class ReticleRenderer : public BaseRenderer { | 93 class ReticleRenderer : public BaseRenderer { |
| 94 public: | 94 public: |
| 95 ReticleRenderer(); | 95 ReticleRenderer(); |
| 96 ~ReticleRenderer() override; | 96 ~ReticleRenderer() override; |
| 97 | 97 |
| 98 void Draw(const gvr::Mat4f& combined_matrix); | 98 void Draw(const gvr::Mat4f& combined_matrix); |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 GLuint combined_matrix_handle_; | 101 GLuint combined_matrix_handle_; |
| 102 | |
| 103 GLuint color_handle_; | 102 GLuint color_handle_; |
| 104 GLuint ring_diameter_handle_; | 103 GLuint ring_diameter_handle_; |
| 105 GLuint inner_hole_handle_; | 104 GLuint inner_hole_handle_; |
| 106 GLuint inner_ring_end_handle_; | 105 GLuint inner_ring_end_handle_; |
| 107 GLuint inner_ring_thickness_handle_; | 106 GLuint inner_ring_thickness_handle_; |
| 108 GLuint mid_ring_end_handle_; | 107 GLuint mid_ring_end_handle_; |
| 109 GLuint mid_ring_opacity_handle_; | 108 GLuint mid_ring_opacity_handle_; |
| 110 | 109 |
| 111 DISALLOW_COPY_AND_ASSIGN(ReticleRenderer); | 110 DISALLOW_COPY_AND_ASSIGN(ReticleRenderer); |
| 112 }; | 111 }; |
| 113 | 112 |
| 114 class LaserRenderer : public BaseRenderer { | 113 class LaserRenderer : public BaseRenderer { |
| 115 public: | 114 public: |
| 116 LaserRenderer(); | 115 LaserRenderer(); |
| 117 ~LaserRenderer() override; | 116 ~LaserRenderer() override; |
| 118 | 117 |
| 119 void Draw(const gvr::Mat4f& combined_matrix); | 118 void Draw(const gvr::Mat4f& combined_matrix); |
| 120 | 119 |
| 121 private: | 120 private: |
| 122 GLuint combined_matrix_handle_; | 121 GLuint combined_matrix_handle_; |
| 123 | |
| 124 GLuint texture_unit_handle_; | 122 GLuint texture_unit_handle_; |
| 125 GLuint texture_data_handle_; | 123 GLuint texture_data_handle_; |
| 126 GLuint color_handle_; | 124 GLuint color_handle_; |
| 127 GLuint fade_point_handle_; | 125 GLuint fade_point_handle_; |
| 128 GLuint fade_end_handle_; | 126 GLuint fade_end_handle_; |
| 129 | 127 |
| 130 DISALLOW_COPY_AND_ASSIGN(LaserRenderer); | 128 DISALLOW_COPY_AND_ASSIGN(LaserRenderer); |
| 131 }; | 129 }; |
| 132 | 130 |
| 133 class VrShellRenderer { | 131 class VrShellRenderer { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 156 std::unique_ptr<WebVrRenderer> webvr_renderer_; | 154 std::unique_ptr<WebVrRenderer> webvr_renderer_; |
| 157 std::unique_ptr<ReticleRenderer> reticle_renderer_; | 155 std::unique_ptr<ReticleRenderer> reticle_renderer_; |
| 158 std::unique_ptr<LaserRenderer> laser_renderer_; | 156 std::unique_ptr<LaserRenderer> laser_renderer_; |
| 159 | 157 |
| 160 DISALLOW_COPY_AND_ASSIGN(VrShellRenderer); | 158 DISALLOW_COPY_AND_ASSIGN(VrShellRenderer); |
| 161 }; | 159 }; |
| 162 | 160 |
| 163 } // namespace vr_shell | 161 } // namespace vr_shell |
| 164 | 162 |
| 165 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ | 163 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ |
| OLD | NEW |