Index: chrome/browser/android/vr_shell/vr_gl.h |
diff --git a/chrome/browser/android/vr_shell/vr_gl.h b/chrome/browser/android/vr_shell/vr_gl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2aca8d97ec8452d87fcfabde47b5929378d12f50 |
--- /dev/null |
+++ b/chrome/browser/android/vr_shell/vr_gl.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
bshe
2016/09/12 15:38:27
perhaps use vr_gl_util as file name?
cjgrant
2016/09/13 17:32:16
I've been encouraged not to name files "util", as
bshe
2016/09/13 19:37:22
ack.
|
+ |
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_H_ |
+#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_H_ |
+ |
+#include "ui/gl/gl_bindings.h" |
+ |
+namespace vr_shell { |
+ |
+std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix); |
+ |
+gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size, |
+ const gvr::Rectf& texture_rect);:w |
mthiesse
2016/09/12 14:18:27
Now now, no need to brag about your vim usage.
;)
|
+ |
+// Compile a shader. |
+GLuint CompileShader(GLenum shader_type, |
+ const GLchar* shader_source, |
+ std::string& error); |
+ |
+// Compile and link a program. |
+GLuint CreateAndLinkProgram(GLuint vertex_shader_handle, |
+ GLuint fragment_shader_handle, |
+ int num_attributes, |
+ const GLchar** attributes, |
+ std::string& error); |
+ |
+} // namespace vr_shell |
+ |
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_H_ |