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_win_DEFINED | 8 #ifndef GLWindowContext_unix_DEFINED |
9 #define GLWindowContext_win_DEFINED | 9 #define GLWindowContext_unix_DEFINED |
10 | 10 |
11 #include <windows.h> | |
12 #include "../GLWindowContext.h" | 11 #include "../GLWindowContext.h" |
| 12 #include "Window_unix.h" |
13 | 13 |
14 namespace sk_app { | 14 namespace sk_app { |
15 | 15 |
16 class GLWindowContext_win : public GLWindowContext { | 16 class GLWindowContext_unix : public GLWindowContext { |
17 public: | 17 public: |
18 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di
splayParams&); | 18 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di
splayParams&); |
19 | 19 |
20 ~GLWindowContext_win() override; | 20 ~GLWindowContext_unix() override; |
21 | 21 |
22 void onSwapBuffers() override; | 22 void onSwapBuffers() override; |
23 | 23 |
24 void onInitializeContext(void*, const DisplayParams&) override; | 24 void onInitializeContext(void*, const DisplayParams&) override; |
25 void onDestroyContext() override; | 25 void onDestroyContext() override; |
26 | 26 |
27 private: | 27 private: |
28 GLWindowContext_win(void*, const DisplayParams&); | 28 GLWindowContext_unix(void*, const DisplayParams&); |
29 | 29 |
30 HWND fHWND; | 30 Display* fDisplay; |
31 HGLRC fHGLRC; | 31 XWindow fWindow; |
| 32 XVisualInfo* fVisualInfo; |
| 33 GLXContext fGLContext; |
32 }; | 34 }; |
33 | 35 |
34 | 36 |
35 } | 37 } |
36 | 38 |
37 #endif | 39 #endif |
OLD | NEW |