| Summary: | Getting Display Handle | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Martin Gerhardy <martin.gerhardy> |
| Component: | video | Assignee: | Martin Gerhardy <martin.gerhardy> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Small testcase (not written by me) for the CL/GL sharing | ||
|
Description
Martin Gerhardy
2018-10-14 09:13:15 UTC
Created attachment 3373 [details] Small testcase (not written by me) for the CL/GL sharing Attached a small glx example where the CL sharing works with glfw and glx And this is the OpenCL extension I'm talking about: https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/cl_khr_gl_sharing.html And the last thing - We also need to know which type of handle it is. Is it glx, egl, wgl, ...? this is due to the fact that OpenCL must know this, too. https://github.com/mgerhardy/engine/blob/master/src/modules/computevideo/cl/CLComputeVideo.cpp CL_WGL_HDC_KHR CL_GLX_DISPLAY_KHR CL_EGL_DISPLAY_KHR CL_CGL_SHAREGROUP_KHR for CGL is quite easy I suppose. CL_GL_CONTEXT_KHR is for the gl context. Would you like to propose an API change for this? What do you think about this? /** * \brief Get the display of the given window * * \param window Window from which the display should be queried */ extern DECLSPEC SDL_GLDisplay SDLCALL SDL_GL_GetDisplay(SDL_Window * window); If nobody votes against this, I would implement it. That sounds reasonable. Let's call it SDL_GL_GetCurrentDisplay() to match the naming from the platform extensions. Thanks! |