[waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window
Jose Fonseca
jfonseca at vmware.com
Wed Jun 4 13:19:17 PDT 2014
----- Original Message -----
> On 31/05/14 19:59, Jose Fonseca wrote:
> > ----- Original Message -----
> >> On 24/05/14 20:28, Emil Velikov wrote:
> [snip]
> >>
> >> 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
> >> context.
> >>
> >>> Options:
> >>> - Create a window, choose format, destroy window.
> >>> No guarantee that the function will behave the same for another
> >>> window/device_context.
> >
> > 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
> wfl_window_create." or
This one. But I'm not 100% what is the best way. Whatever works really.
Jose
> "Create a invisible(dummy) window initially and bring it up/use it at
> wfl_window_create/wfl_window_show." ?
>
>
> Pardon if the above question sound rather dull :)
>
> Thanks
> Emil
>
> > You can see in
> > https://urldefense.proofpoint.com/v1/url?u=http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=EVvdAN6DpAMPSYORbM%2BCu4MTEMmLt5L7XFRXd%2Be9PvI%3D%0A&s=7d4dab293ed0b1192ad5e333f73785f2aa7efedbd4ea4ec656a41ff96078d8c3
> > how to create an invisible window (This is how Mesa implements pbuffers
> > on Windows!.)
> >
> > Jose
> >
> >>> - or, create window, choose format, reuse window on
> >>> waffle_window_create()
> >>> Sanest solution. If windows is not created just make one (i.e.
> >>> waffle_config_choose is not executed before
> >>> waffle_window_create).
> >>>
> >>> - 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)
> >>>
> >>> Suggestion:
> >>> "Cache" the window, and reuse it on waffle_window_create.
> >>>
>
More information about the waffle
mailing list