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

Side by Side Diff: chrome/browser/android/vr_shell/vr_gl_util.h

Issue 2396663002: Reland gvr upgrade (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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_GL_UTIL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
7 7
8 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_types.h" 8 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_ty pes.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 10
11 namespace vr_shell { 11 namespace vr_shell {
12 12
13 std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix); 13 std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix);
14 14
15 gvr::Rectf ModulateRect(const gvr::Rectf& rect, float width, float height); 15 gvr::Rectf ModulateRect(const gvr::Rectf& rect, float width, float height);
16 16
17 gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size, 17 gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size,
18 const gvr::Rectf& texture_rect); 18 const gvr::Rectf& texture_rect);
19 19
20 // Compile a shader. 20 // Compile a shader.
21 GLuint CompileShader(GLenum shader_type, 21 GLuint CompileShader(GLenum shader_type,
22 const GLchar* shader_source, 22 const GLchar* shader_source,
23 std::string& error); 23 std::string& error);
24 24
25 // Compile and link a program. 25 // Compile and link a program.
26 GLuint CreateAndLinkProgram(GLuint vertex_shader_handle, 26 GLuint CreateAndLinkProgram(GLuint vertex_shader_handle,
27 GLuint fragment_shader_handle, 27 GLuint fragment_shader_handle,
28 std::string& error); 28 std::string& error);
29 29
30 } // namespace vr_shell 30 } // namespace vr_shell
31 31
32 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ 32 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698