| SDL and OpenCL |
|
mariuszp
|
bump
|
|||||||||||
|
|
||||||||||||
| SDL and OpenCL |
|
Jonas Kulla
Guest
|
2014-05-05 21:04 GMT+02:00 mariuszp:
For all three desktop platforms, the SDL_GLContext is just a typecasted native context (GLXContext, HGLDC, NSOpenGLContext (last one is subclassed it seems)), so there you have your first parameter almost for free. To get the second parameter on X11/Windows, look at src/video/x11/SDL_x11video.h and src/video/windows/SDL_windowswindow.h. In Windows' case, the HDC is directly stored in the window private data; on X11, the window struct has a pointer to 'struct SDL_VideoData' where you'll find the Display handle. On OSX, it seems all you need is the context handle (and the share group created from it), you'll have to extract the lower level CGLContextObj handle from the NSOpenGLContext first though. That's all just from a few minutes of googling and looking through SDL's source code, I'm not familiar with OpenCL so I'm not sure if this is enough (you'll probably need to check for a necessary OpenCL extension too or something). |
|||||||||||||
|
|
||||||||||||||

