OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ETCAtlasAlpha.h
Go to the documentation of this file.
1 /* Copyright (c) 2012-2017, ARM Limited and Contributors
2  *
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge,
6  * to any person obtaining a copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
9  * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19  */
20 
21 #ifndef ETCATLASALPHA_H
22 #define ETCATLASALPHA_H
23 
24 #define GLES_VERSION 2
25 
26 #include <GLES2/gl2.h>
27 
28 /* These indices describe triangle strips, separated by degenerate triangles where necessary. */
29 static const GLubyte indices[] =
30 {
31  0, 1, 2, 3, 3, 4, 4, 5, 6, 7, 7, 8,
32  8, 9, 10, 11, 11, 12, 12, 13, 14, 15, 15, 16,
33  16, 17, 18, 19, 19, 20, 20, 21, 22, 23, 23, 24,
34  24, 25, 26, 27, 27, 28, 28, 29, 30, 31, 31, 32,
35  32, 33, 34, 35,
36 };
37 
38 /* Tri strips, so quads are in this order:
39  *
40  * 0 ----- 24 - 68-10 etc.
41  * | / || / |9-11
42  * | / |5 - 7
43  * | / |
44  * 1 ----- 3
45  */
46 static const GLfloat vertices[] =
47 {
48  /* 256 x 128 */
49  -1.000000f, 1.0000f, 0.0f, /* 0 */
50  -1.000000f, 0.4666f, 0.0f, /* 1 */
51  -0.200000f, 1.0000f, 0.0f, /* 2 */
52  -0.200000f, 0.4666f, 0.0f, /* 3 */
53  /* 128 x 64 */
54  -0.200000f, 1.0000f, 0.0f, /* 4 */
55  -0.200000f, 0.7333f, 0.0f, /* 5 */
56  0.200000f, 1.0000f, 0.0f, /* 6 */
57  0.200000f, 0.7333f, 0.0f, /* 7 */
58  /* 64 x 32 */
59  0.200000f, 1.0000f, 0.0f, /* 8 */
60  0.200000f, 0.8666f, 0.0f, /* 9 */
61  0.400000f, 1.0000f, 0.0f, /* 10 */
62  0.400000f, 0.8666f, 0.0f, /* 11 */
63  /* 32 x 16 */
64  0.400000f, 1.0000f, 0.0f, /* 12 */
65  0.400000f, 0.9333f, 0.0f, /* 13 */
66  0.500000f, 1.0000f, 0.0f, /* 14 */
67  0.500000f, 0.9333f, 0.0f, /* 15 */
68  /* 16 x 8 */
69  0.500000f, 1.0000f, 0.0f, /* 16 */
70  0.500000f, 0.9666f, 0.0f, /* 17 */
71  0.550000f, 1.0000f, 0.0f, /* 18 */
72  0.550000f, 0.9666f, 0.0f, /* 19 */
73  /* 8 x 4 */
74  0.550000f, 1.0000f, 0.0f, /* 20 */
75  0.550000f, 0.9833f, 0.0f, /* 21 */
76  0.575000f, 1.0000f, 0.0f, /* 22 */
77  0.575000f, 0.9833f, 0.0f, /* 23 */
78  /* 4 x 2 */
79  0.575000f, 1.0000f, 0.0f, /* 24 */
80  0.575000f, 0.9916f, 0.0f, /* 25 */
81  0.587500f, 1.0000f, 0.0f, /* 26 */
82  0.587500f, 0.9916f, 0.0f, /* 27 */
83  /* 2 x 1 */
84  0.587500f, 1.0000f, 0.0f, /* 28 */
85  0.587500f, 0.9958f, 0.0f, /* 29 */
86  0.593750f, 1.0000f, 0.0f, /* 30 */
87  0.593750f, 0.9958f, 0.0f, /* 31 */
88  /* 1 x 1 */
89  0.593750f, 1.0000f, 0.0f, /* 32 */
90  0.593750f, 0.9958f, 0.0f, /* 33 */
91  0.596875f, 1.0000f, 0.0f, /* 34 */
92  0.596875f, 0.9958f, 0.0f, /* 35 */
93 };
94 
95 /* Because textures are loaded flipped, (0, 0) refers to top left corner. */
96 /* The texture orientation is the same for each quad. */
97 static const GLfloat textureCoordinates[] =
98 {
99  0.0f, 0.0f, /* 0 */
100  0.0f, 1.0f, /* 1 */
101  1.0f, 0.0f, /* 2 */
102  1.0f, 1.0f, /* 3 */
103 
104  0.0f, 0.0f, /* 4 */
105  0.0f, 1.0f, /* 5 */
106  1.0f, 0.0f, /* 6 */
107  1.0f, 1.0f, /* 7 */
108 
109  0.0f, 0.0f, /* 8 */
110  0.0f, 1.0f, /* 9 */
111  1.0f, 0.0f, /* 10 */
112  1.0f, 1.0f, /* 11 */
113 
114  0.0f, 0.0f, /* 12 */
115  0.0f, 1.0f, /* 13 */
116  1.0f, 0.0f, /* 14 */
117  1.0f, 1.0f, /* 15 */
118 
119  0.0f, 0.0f, /* 16 */
120  0.0f, 1.0f, /* 17 */
121  1.0f, 0.0f, /* 18 */
122  1.0f, 1.0f, /* 19 */
123 
124  0.0f, 0.0f, /* 20 */
125  0.0f, 1.0f, /* 21 */
126  1.0f, 0.0f, /* 22 */
127  1.0f, 1.0f, /* 23 */
128 
129  0.0f, 0.0f, /* 24 */
130  0.0f, 1.0f, /* 25 */
131  1.0f, 0.0f, /* 26 */
132  1.0f, 1.0f, /* 27 */
133 
134  0.0f, 0.0f, /* 28 */
135  0.0f, 1.0f, /* 29 */
136  1.0f, 0.0f, /* 30 */
137  1.0f, 1.0f, /* 31 */
138 
139  0.0f, 0.0f, /* 32 */
140  0.0f, 1.0f, /* 33 */
141  1.0f, 0.0f, /* 34 */
142  1.0f, 1.0f, /* 35 */
143 };
144 
145 #endif /* ETCATLASALPHA_H */
static const GLfloat vertices[]
Definition: ETCAtlasAlpha.h:46
GLsizei GLenum const void * indices
Definition: gl2ext.h:322
typedef GLfloat(GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC)(GLuint path
static const GLfloat textureCoordinates[]
Definition: ETCAtlasAlpha.h:97