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

Unified Diff: chrome/browser/android/vr_shell/vr_gl_util.h

Issue 2335643002: Add VR Shell animation classes and unit test. (Closed)
Patch Set: Add VR Shell animation classes and unit test. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_gl_util.h
diff --git a/chrome/browser/android/vr_shell/vr_gl_util.h b/chrome/browser/android/vr_shell/vr_gl_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..28b2a723c66373dcb5197d6021f156c45b350d6f
--- /dev/null
+++ b/chrome/browser/android/vr_shell/vr_gl_util.h
@@ -0,0 +1,35 @@
+// 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
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
+
+#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
+#include "ui/gl/gl_bindings.h"
+
+namespace vr_shell {
+
+std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix);
+
+gvr::Rectf ModulateRect(const gvr::Rectf& rect, float width, float height);
+
+gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size,
+ const gvr::Rectf& texture_rect);
+
+
+// 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_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698