[waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window
emil.l.velikov at gmail.com
Sat May 31 14:02:46 PDT 2014
On 31/05/14 19:59, Jose Fonseca wrote:
> ----- Original Message -----
>> On 24/05/14 20:28, Emil Velikov wrote:
>> AFAICS waffle is unique wrt other projects (apitrace, epoxy, glut) as it
>> allows the PixelFormat to be called prior to the creation of either window or
>>> - Create a window, choose format, destroy window.
>>> No guarantee that the function will behave the same for another
> In practice, the odds of this happening are very low.
> I'd recommend creating an invisible window, do your things then, keep the window around, and then merely double check later that things are not busted.
Still not sure which one of the two you are recommending:
"Create a invisible(dummy) window initially and create a new one at
"Create a invisible(dummy) window initially and bring it up/use it at
Pardon if the above question sound rather dull :)
> You can see in http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c how to create an invisible window (This is how Mesa implements pbuffers on Windows!.)
>>> - or, create window, choose format, reuse window on
>>> Sanest solution. If windows is not created just make one (i.e.
>>> waffle_config_choose is not executed before
>>> - or, store the attributes, and invoke ChoosePixelFormat as
>>> waffle_window_create is executed.
>>> What if code-flow depends on waffle_config_choose's return value
>>> - or rework waffle API ... (no, please no)
>>> "Cache" the window, and reuse it on waffle_window_create.
More information about the waffle