1/*
2* Copyright (C) 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#ifndef _EGL_CONTEXT_H
17#define _EGL_CONTEXT_H
18
19#include "GLClientState.h"
20#include "GLSharedGroup.h"
21
22struct EGLContext_t {
23
24    enum {
25        IS_CURRENT      =   0x00010000,
26        NEVER_CURRENT   =   0x00020000
27    };
28
29    EGLContext_t(EGLDisplay dpy, EGLConfig config, EGLContext_t* shareCtx);
30    ~EGLContext_t();
31    uint32_t            flags;
32    EGLDisplay          dpy;
33    EGLConfig           config;
34    EGLSurface          read;
35    EGLSurface          draw;
36    EGLContext_t    *   shareCtx;
37    EGLint                version;
38    uint32_t             rcContext;
39    const char*         versionString;
40    const char*         vendorString;
41    const char*         rendererString;
42    const char*         extensionString;
43
44    GLClientState * getClientState(){ return clientState; }
45    GLSharedGroupPtr getSharedGroup(){ return sharedGroup; }
46private:
47    GLClientState    *    clientState;
48    GLSharedGroupPtr      sharedGroup;
49};
50
51#endif
52