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

Side by Side Diff: remoting/client/gl_math.h

Issue 2614443003: Moving the GL implementation details into a sub folder for client display. (Closed)
Patch Set: Adding deps restriction on r/c/display; Moving sys_opengl.h Created 3 years, 11 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
« no previous file with comments | « remoting/client/gl_helpers.cc ('k') | remoting/client/gl_math.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_CLIENT_OPENGL_GL_MATH_H_
6 #define REMOTING_CLIENT_OPENGL_GL_MATH_H_
7
8 #include <array>
9 #include <string>
10
11 #include "base/macros.h"
12
13 namespace remoting {
14
15 // Transposes matrix [ m0, m1, m2, m3, m4, m5, m6, m7, m8 ]:
16 //
17 // | m0, m1, m2, | | x |
18 // | m3, m4, m5, | * | y |
19 // | m6, m7, m8 | | 1 |
20 //
21 // Into [ m0, m3, m6, m1, m4, m7, m2, m5, m8 ].
22 void TransposeTransformationMatrix(std::array<float, 9>* matrix);
23
24 // Given left, top, width, height of a rectangle, fills |positions| with
25 // coordinates of four vertices of the rectangle.
26 // positions: [ x_upperleft, y_upperleft, x_lowerleft, y_lowerleft,
27 // x_upperright, y_upperright, x_lowerright, y_lowerright ]
28 void FillRectangleVertexPositions(float left,
29 float top,
30 float width,
31 float height,
32 std::array<float, 8>* positions);
33
34 // Returns the string representation of the matrix for debugging.
35 //
36 // For example:
37 // [
38 // 1, 0, 0,
39 // 0, 1, 0,
40 // 0, 0, 1,
41 // ]
42 std::string MatrixToString(const float* mat, int num_rows, int num_cols);
43
44 } // namespace remoting
45
46 #endif // REMOTING_CLIENT_OPENGL_GL_MATH_H_
OLDNEW
« no previous file with comments | « remoting/client/gl_helpers.cc ('k') | remoting/client/gl_math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698