OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2016 Google Inc. | 3 * Copyright 2016 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef GLWindowContext_unix_DEFINED | 8 #ifndef GLWindowContext_android_DEFINED |
9 #define GLWindowContext_unix_DEFINED | 9 #define GLWindowContext_android_DEFINED |
10 | 10 |
11 #include "../GLWindowContext.h" | 11 #include "../GLWindowContext.h" |
12 #include "Window_unix.h" | 12 #include "Window_android.h" |
| 13 |
| 14 #include <EGL/egl.h> |
13 | 15 |
14 namespace sk_app { | 16 namespace sk_app { |
15 | 17 |
16 class GLWindowContext_unix : public GLWindowContext { | 18 class GLWindowContext_android : public GLWindowContext { |
17 public: | 19 public: |
18 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di
splayParams&); | 20 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di
splayParams&); |
19 | 21 |
20 ~GLWindowContext_unix() override; | 22 ~GLWindowContext_android() override; |
21 | 23 |
22 void onSwapBuffers() override; | 24 void onSwapBuffers() override; |
23 | 25 |
24 void onInitializeContext(void*, const DisplayParams&) override; | 26 void onInitializeContext(void*, const DisplayParams&) override; |
25 void onDestroyContext() override; | 27 void onDestroyContext() override; |
26 | 28 |
27 private: | 29 private: |
28 GLWindowContext_unix(void*, const DisplayParams&); | 30 GLWindowContext_android(void*, const DisplayParams&); |
29 | 31 |
30 Display* fDisplay; | 32 EGLDisplay fDisplay; |
31 XWindow fWindow; | 33 EGLContext fEGLContext; |
32 XVisualInfo* fVisualInfo; | 34 EGLSurface fSurface; |
33 GLXContext fGLContext; | |
34 }; | 35 }; |
35 | 36 |
36 | 37 |
37 } | 38 } |
38 | 39 |
39 #endif | 40 #endif |
OLD | NEW |