On 5/17/19 18:42, Henri Verbeet wrote:
On Fri, 17 May 2019 at 19:48, Paul Gofman gofmanp@gmail.com wrote:
Do you suggest to use wined3d_ffp_get_vs_settings() directly? It probably needs some redesign first for that, as it uses gl_info and hardware limits (light count, as well as bitfields in settings structure). Or do you mean factoring out some functions like init_light_sources() to use in process_vertices_strided() and init_light_settings() which would use some more generic structure and parameters not to depend on GL limits?
My thinking was to just use it as-is, and then either ignore or fix-up the differences afterwards. Light counts would have to be handled separately because of the bitfield sizes, but that's fairly straight-forward code.
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.