OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ETCUncompressedAlpha.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 ETCUUNCOMPRESSEDALPHA_H
22 #define ETCUUNCOMPRESSEDALPHA_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 /* Triangle 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 /*
96  * Because textures are loaded flipped, (0, 0) refers to top left corner.
97  * The texture orientation is the same for each quad.
98  */
99 static const GLfloat textureCoordinates[] =
100 {
101  0.0f, 0.0f, /* 0 */
102  0.0f, 1.0f, /* 1 */
103  1.0f, 0.0f, /* 2 */
104  1.0f, 1.0f, /* 3 */
105 
106  0.0f, 0.0f, /* 4 */
107  0.0f, 1.0f, /* 5 */
108  1.0f, 0.0f, /* 6 */
109  1.0f, 1.0f, /* 7 */
110 
111  0.0f, 0.0f, /* 8 */
112  0.0f, 1.0f, /* 9 */
113  1.0f, 0.0f, /* 10 */
114  1.0f, 1.0f, /* 11 */
115 
116  0.0f, 0.0f, /* 12 */
117  0.0f, 1.0f, /* 13 */
118  1.0f, 0.0f, /* 14 */
119  1.0f, 1.0f, /* 15 */
120 
121  0.0f, 0.0f, /* 16 */
122  0.0f, 1.0f, /* 17 */
123  1.0f, 0.0f, /* 18 */
124  1.0f, 1.0f, /* 19 */
125 
126  0.0f, 0.0f, /* 20 */
127  0.0f, 1.0f, /* 21 */
128  1.0f, 0.0f, /* 22 */
129  1.0f, 1.0f, /* 23 */
130 
131  0.0f, 0.0f, /* 24 */
132  0.0f, 1.0f, /* 25 */
133  1.0f, 0.0f, /* 26 */
134  1.0f, 1.0f, /* 27 */
135 
136  0.0f, 0.0f, /* 28 */
137  0.0f, 1.0f, /* 29 */
138  1.0f, 0.0f, /* 30 */
139  1.0f, 1.0f, /* 31 */
140 
141  0.0f, 0.0f, /* 32 */
142  0.0f, 1.0f, /* 33 */
143  1.0f, 0.0f, /* 34 */
144  1.0f, 1.0f, /* 35 */
145 };
146 
147 #endif /* ETCUUNCOMPRESSEDALPHA_H */
static const GLfloat textureCoordinates[]
static const GLfloat vertices[]
GLsizei GLenum const void * indices
Definition: gl2ext.h:322
typedef GLfloat(GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC)(GLuint path