SDL_CreateWindowFrom and the SDL_WINDOW_OPENGL flag |
SDL_CreateWindowFrom and the SDL_WINDOW_OPENGL flag |
Jonny D
|
It might be possible to transparently check if the foreign window has OpenGL support without a hint. Using the Win32 GetPixelFormat() and then DescribePixelFormat(), I think you can recover the PIXELFORMATDESCRIPTOR and check the flags for PFD_SUPPORT_OPENGL.
Jonny D On Fri, Aug 21, 2015 at 8:45 AM, Mason Wheeler wrote:
|
|||||||||||||
|
SDL_CreateWindowFrom and the SDL_WINDOW_OPENGL flag |
Mason Wheeler
Guest
|
That actually doesn't seem particularly meaningful for determining whether or not the window supports OpenGL, because you can always set a new pixel format. The only really relevant thing is whether or not the *system* supports OpenGL.
From: Jonathan Dearborn To: Mason Wheeler; SDL Development List Sent: Friday, August 21, 2015 12:02 PM Subject: Re: [SDL] SDL_CreateWindowFrom and the SDL_WINDOW_OPENGL flag It might be possible to transparently check if the foreign window has OpenGL support without a hint. Using the Win32 GetPixelFormat() and then DescribePixelFormat(), I think you can recover the PIXELFORMATDESCRIPTOR and check the flags for PFD_SUPPORT_OPENGL. Jonny D On Fri, Aug 21, 2015 at 8:45 AM, Mason Wheeler wrote:
|
|||||||||||||
|
SDL_CreateWindowFrom and the SDL_WINDOW_OPENGL flag |
Jonny D
|
As far as I understand, the pixel format is validated in ChoosePixelFormat()/SetPixelFormat() and the actual flags supported are returned in the last parameter. So if the system does not support OpenGL, the returned format (which is the same as you get from GetPixelFormat()/DescribePixelFormat()) will not have the PFD_SUPPORT_OPENGL flag.
Jonny D On Fri, Aug 21, 2015 at 2:17 PM, Mason Wheeler wrote:
|
|||||||||||||||
|