On Fri, 17 May 2019 at 20:47, Paul Gofman gofmanp@gmail.com wrote:
Do you think it is ok then just to use it (providing the first context from device, as I don't have one in process_vertices()), initialize wined3d_ffp_vs_settings and use the fields from there to initialize the similar fieldsin the local structure (as I cannot replace it anyway due to the lights)? I can do that of course, my only concern is that it might end up adding nearly the same amount of code that it saves.
You can acquire a context by calling "context_acquire(device, NULL, 0);", and release it again with "context_release();". Using the wined3d_ffp_vs_settings structure to initialise the lights_settings structure would be fine. Another option would be to embed the wined3d_ffp_vs_settings structure in the lights_settings one. I'm not against extracting helpers from wined3d_ffp_get_vs_settings() for specific fields either if that ends up making more sense though, although I'd expect you'd need most of what's in wined3d_ffp_vs_settings at some point. The concern is more about duplicated code diverging over time than about saving lines of code.