On 6/13/06, H. Verbeet hverbeet@gmail.com wrote:
On 13/06/06, Raphael fenix@club-internet.fr wrote:
I only have one question: i see you have a cache to reuse prgid in set_glsl_shader_program but what happens if user/app change the shaders content (for example using SetFunction) ? your pre-compiled program will be correct ? (because i don't see any list cleanup in shaders function reset)
Good point :-) I wonder if respecifying the source and recompiling the program is worth it, or if we should just create a new shader object.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/...
From what I can tell (for DX9 at least), the app shouldn't be able to
use SetFunction(). I thought it was an internal wined3d function. Unless it's a DX8 call that I'm unaware of. I haven't seen any apps try to do that yet, but maybe I'm just not looking closely enough. :-) The apps tend to CreatePixelShader(), then later [often during the render loop], they SetPixelShader(). I haven't seen any that modify an existing shader yet.