blob: 8b4255826349758a0ff63f1d57064ce5bdcd3ed9 [file] [log] [blame]
Mathias Agopian1cadb252011-05-23 17:26:14 -07001/*
2 ** Copyright 2011, The Android Open Source Project
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16
17#ifndef ANDROID_EGLDEFS_H
18#define ANDROID_EGLDEFS_H
19
20#include "hooks.h"
21
22// ----------------------------------------------------------------------------
23namespace android {
24// ----------------------------------------------------------------------------
25
26#define VERSION_MAJOR 1
27#define VERSION_MINOR 4
28
29// EGLDisplay are global, not attached to a given thread
30const unsigned int NUM_DISPLAYS = 1;
31
32enum {
Mathias Agopian1cadb252011-05-23 17:26:14 -070033 GLESv1_INDEX = 0,
Mathias Agopianada798b2012-02-13 17:09:30 -080034 GLESv2_INDEX = 1
Mathias Agopian1cadb252011-05-23 17:26:14 -070035};
36
37// ----------------------------------------------------------------------------
38
39struct egl_connection_t
40{
41 inline egl_connection_t() : dso(0) { }
42 void * dso;
43 gl_hooks_t * hooks[2];
44 EGLint major;
45 EGLint minor;
46 egl_t egl;
47};
48
49// ----------------------------------------------------------------------------
50
Mathias Agopianada798b2012-02-13 17:09:30 -080051extern gl_hooks_t gHooks[2];
Mathias Agopian1cadb252011-05-23 17:26:14 -070052extern gl_hooks_t gHooksNoContext;
53extern pthread_key_t gGLWrapperKey;
54extern "C" void gl_unimplemented();
Mathias Agopian48d438d2012-01-28 21:44:00 -080055extern "C" void gl_noop();
Mathias Agopian1cadb252011-05-23 17:26:14 -070056
57extern char const * const gl_names[];
58extern char const * const egl_names[];
59
Mathias Agopianada798b2012-02-13 17:09:30 -080060extern egl_connection_t gEGLImpl;
Mathias Agopian1cadb252011-05-23 17:26:14 -070061
62// ----------------------------------------------------------------------------
63}; // namespace android
64// ----------------------------------------------------------------------------
65
66#endif /* ANDROID_EGLDEFS_H */