Mali OpenGL ES SDK
2.0.0
A simple framework to aid development of OpenGL ES applications targeting ARM Mali platforms.
Main Page
Classes
Files
File List
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
EGLRuntime.h
1
/*
2
* This confidential and proprietary software may be used only as
3
* authorised by a licensing agreement from ARM Limited
4
* (C) COPYRIGHT 2012 ARM Limited
5
* ALL RIGHTS RESERVED
6
* The entire notice above must be reproduced on all authorised
7
* copies and copies may only be made to the extent permitted
8
* by a licensing agreement from ARM Limited.
9
*/
10
11
#ifndef EGLRUNTIME_H
12
#define EGLRUNTIME_H
13
14
#include <EGL/egl.h>
15
#include <EGL/eglext.h>
16
#define EGL_CHECK(x) \
17
x; \
18
{ \
19
EGLint eglError = eglGetError(); \
20
if(eglError != EGL_SUCCESS) { \
21
LOGE("eglGetError() = %i (0x%.8x) at %s:%i\n", (signed int)eglError, (unsigned int)eglError, __FILE__, __LINE__); \
22
exit(1); \
23
} \
24
}
25
26
namespace
MaliSDK
27
{
33
class
EGLRuntime
34
{
35
private
:
36
static
const
int
redSize;
37
static
const
int
greenSize;
38
static
const
int
blueSize;
39
static
const
int
bufferSize;
40
41
public
:
42
/*
43
* \brief Switch to disable AntiAliasing for those platforms which don't support it.
44
*/
45
static
bool
disableAntiAliasing;
46
50
enum
OpenGLESVersion
{OPENGLES1, OPENGLES2, OPENGLES3};
51
57
static
EGLint
configAttributes
[];
58
64
static
EGLint
contextAttributes
[];
65
71
static
EGLint
windowAttributes
[];
72
78
static
EGLDisplay
display
;
79
86
static
EGLContext
context
;
87
94
static
EGLSurface
surface
;
95
99
static
EGLConfig
config
;
100
108
static
void
initializeEGL
(
OpenGLESVersion
requestedAPIVersion);
109
113
static
void
terminateEGL
(
void
);
114
};
115
}
116
117
#endif
/* EGLRUNTIME_H */
simple-framework
inc
EGLRuntime.h
(C) ARM Ltd. 2012