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 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 DISALLOW_COPY_AND_ASSIGN(BaseRenderer); | 46 DISALLOW_COPY_AND_ASSIGN(BaseRenderer); |
47 }; | 47 }; |
48 | 48 |
49 class TexturedQuadRenderer : public BaseRenderer { | 49 class TexturedQuadRenderer : public BaseRenderer { |
50 public: | 50 public: |
51 TexturedQuadRenderer(); | 51 TexturedQuadRenderer(); |
52 ~TexturedQuadRenderer() override; | 52 ~TexturedQuadRenderer() override; |
53 | 53 |
54 // Draw the content rect in the texture quad. | 54 // Draw the content rect in the texture quad. |
55 void Draw(int texture_data_handle, const gvr::Mat4f& combined_matrix, | 55 void Draw(int texture_data_handle, const gvr::Mat4f& combined_matrix, |
56 const Rectf& copy_rect); | 56 const Rectf& copy_rect, float opacity); |
57 | 57 |
58 private: | 58 private: |
59 GLuint combined_matrix_handle_; | 59 GLuint combined_matrix_handle_; |
60 GLuint copy_rect_uniform_handle_; | 60 GLuint copy_rect_uniform_handle_; |
61 GLuint tex_uniform_handle_; | 61 GLuint tex_uniform_handle_; |
| 62 GLuint opacity_handle_; |
62 | 63 |
63 DISALLOW_COPY_AND_ASSIGN(TexturedQuadRenderer); | 64 DISALLOW_COPY_AND_ASSIGN(TexturedQuadRenderer); |
64 }; | 65 }; |
65 | 66 |
66 // Renders a page-generated stereo VR view. | 67 // Renders a page-generated stereo VR view. |
67 class WebVrRenderer : public BaseRenderer { | 68 class WebVrRenderer : public BaseRenderer { |
68 public: | 69 public: |
69 WebVrRenderer(); | 70 WebVrRenderer(); |
70 ~WebVrRenderer() override; | 71 ~WebVrRenderer() override; |
71 | 72 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 std::unique_ptr<WebVrRenderer> webvr_renderer_; | 147 std::unique_ptr<WebVrRenderer> webvr_renderer_; |
147 std::unique_ptr<ReticleRenderer> reticle_renderer_; | 148 std::unique_ptr<ReticleRenderer> reticle_renderer_; |
148 std::unique_ptr<LaserRenderer> laser_renderer_; | 149 std::unique_ptr<LaserRenderer> laser_renderer_; |
149 | 150 |
150 DISALLOW_COPY_AND_ASSIGN(VrShellRenderer); | 151 DISALLOW_COPY_AND_ASSIGN(VrShellRenderer); |
151 }; | 152 }; |
152 | 153 |
153 } // namespace vr_shell | 154 } // namespace vr_shell |
154 | 155 |
155 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ | 156 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ |
OLD | NEW |