Originally posted by F i L
View Post
You are right, that for context creation SDL and the likes are very nice (I vote for SFML), but they are only capable of creating GL context for the default adapter.. However I am involved in HPC and GPGPU programming, and I was looking for a simple way to spawn OpenCL-OpenGL interop contexts on ALL the GPUs, even if they are off-screen, meaning there are no monitors attached and do rendering to textures. You can guess that you need to go elbow deep into the native APIs, and this is exactly the part where WinAPI proves it's worth. When you have to query low-level device IDs (display server), hand them over to the compositor, ask if the device is used on a screen, if not, create a new off-screen desktop... This is the part where it really matters whether the display server was designed by keeping the sompositor in mind, and how well they play together. X did not really help in the off-screen part. Even though I made friends with non-sense such as creating a dummy OpenGL context only to obtain the supported version, discard the context, then create a new one; I somehow lost my interest in GLX when I saw that pre-1.3 and post-1.3 API differs (the actual version might differ), and there is a completely alternate way to go about querying windowin extensions. This was the point I said: ah, just **** it. Off to Wayland.
Ultimately I ended up with Qt, even though I do not like depending on it, because it is too big. The compile-time OpenGL function wrappers are really nice and eventually, I can make friends with it, if it gets the multi-context job done for "free".
Comment