OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
David Trainor- moved to gerrit
2016/09/14 21:43:30
I'm assuming vr_gl_util is all copied from other p
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | |
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | |
7 | |
8 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_types.h" | |
9 #include "ui/gl/gl_bindings.h" | |
10 | |
11 namespace vr_shell { | |
12 | |
13 std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix); | |
14 | |
15 gvr::Rectf ModulateRect(const gvr::Rectf& rect, float width, float height); | |
16 | |
17 gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size, | |
18 const gvr::Rectf& texture_rect); | |
19 | |
20 | |
21 // Compile a shader. | |
22 GLuint CompileShader(GLenum shader_type, | |
23 const GLchar* shader_source, | |
24 std::string& error); | |
25 | |
26 // Compile and link a program. | |
27 GLuint CreateAndLinkProgram(GLuint vertex_shader_handle, | |
28 GLuint fragment_shader_handle, | |
29 int num_attributes, | |
30 const GLchar** attributes, | |
31 std::string& error); | |
32 | |
33 } // namespace vr_shell | |
34 | |
35 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | |
OLD | NEW |