| 65 | Platform* g_Platform = nullptr; |
| 66 | |
| 67 | inline void glfwSetWindow(GLFWwindow* _window) |
| 68 | { |
| 69 | bgfx::PlatformData pd; |
| 70 | #if BX_PLATFORM_LINUX || BX_PLATFORM_BSD |
| 71 | pd.ndt = glfwGetX11Display(); |
| 72 | pd.nwh = (void*)(uintptr_t)glfwGetGLXWindow(_window); |
| 73 | pd.context = glfwGetGLXContext(_window); |
| 74 | #elif BX_PLATFORM_OSX |
| 75 | pd.ndt = NULL; |
| 76 | pd.nwh = glfwGetCocoaWindow(_window); |
| 77 | pd.context = glfwGetNSGLContext(_window); |
| 78 | #elif BX_PLATFORM_WINDOWS |
| 79 | pd.ndt = NULL; |
| 80 | pd.nwh = glfwGetWin32Window(_window); |
| 81 | pd.context = NULL; |
| 82 | #endif // BX_PLATFORM_WINDOWS |
| 83 | pd.backBuffer = NULL; |
| 84 | pd.backBufferDS = NULL; |
| 85 | setPlatformData(pd); |
| 86 | } |
| 87 | |
| 88 | int32_t PlatformGLFW::run(int argc, char** argv) |
| 89 | { |