OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ETCHeader.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-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 
22 #ifndef ETCHEADER_H
23 #define ETCHEADER_H
24 
25 #include <GLES3/gl3.h>
26 
27 namespace MaliSDK
28 {
32  class ETCHeader
33  {
34  private:
35  unsigned char paddedWidthMSB;
36  unsigned char paddedWidthLSB;
37  unsigned char paddedHeightMSB;
38  unsigned char paddedHeightLSB;
39  unsigned char widthMSB;
40  unsigned char widthLSB;
41  unsigned char heightMSB;
42  unsigned char heightLSB;
43  public:
47  ETCHeader();
48 
52  ETCHeader(unsigned char *data);
53 
62  unsigned short getWidth(void);
63 
72  unsigned short getHeight(void);
73 
81  unsigned short getPaddedWidth(void);
82 
90  unsigned short getPaddedHeight(void);
91 
99  GLsizei getSize(GLenum internalFormat);
100  };
101 }
102 #endif /* ETCHEADER_H */
unsigned short getPaddedHeight(void)
The height of the compressed texture with the padding added.
Definition: ETCHeader.cpp:63
unsigned char heightLSB
Definition: ETCHeader.h:48
unsigned char paddedHeightMSB
Definition: ETCHeader.h:43
unsigned char paddedWidthLSB
Definition: ETCHeader.h:42
unsigned short getHeight(void)
The height of the original texture.
Definition: ETCHeader.cpp:53
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
Definition: gl2ext.h:179
unsigned char heightMSB
Definition: ETCHeader.h:47
unsigned short getPaddedWidth(void)
The width of the compressed texture with the padding added.
Definition: ETCHeader.cpp:58
unsigned char widthMSB
Definition: ETCHeader.h:45
unsigned char widthLSB
Definition: ETCHeader.h:46
unsigned char paddedWidthMSB
Definition: ETCHeader.h:41
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
unsigned short getWidth(void)
The width of the original texture.
Definition: ETCHeader.cpp:48
GLsizei getSize(GLenum internalFormat)
The size of the compressed texture with the padding added.
Definition: ETCHeader.cpp:66
unsigned char paddedHeightLSB
Definition: ETCHeader.h:44
ETCHeader()
Default constructor.
Definition: ETCHeader.cpp:25