On 03/14/2017 12:47 AM, Matteo Bruni wrote:
2017-03-09 23:15 GMT+01:00 Paul Gofman gofmanp@gmail.com:
Signed-off-by: Paul Gofman gofmanp@gmail.com
struct d3dx_state *states; struct d3dx_parameter *annotations;
- D3DLIGHT9 current_light[8];
- D3DMATERIAL9 current_material; };
I think these might be stored in the effect struct instead.
Yes actually, too passes can't be active at a time and each BeginPass should initialize this in effect structure correctly.
+static void clear_dirty_all(struct d3dx9_base_effect *base)
clear_dirty_params() or something like that would be a clearer name.
I will change the name.
@@ -1570,8 +1587,12 @@ static HRESULT d3dx9_base_effect_set_int(struct d3dx9_base_effect *base, D3DXHAN { if (param->rows == 1 && param->columns == 1) {
set_number(param->data, param->type, &n, D3DXPT_INT);
set_dirty(param);
DWORD value;
set_number(&value, param->type, &n, D3DXPT_INT);
if (value != *(DWORD *)param->data)
set_dirty(param);
*(DWORD *)param->data = value;
Shouldn't this go in the previous patch?
Yes, sure. There is actually another fix I made in the next patches which makes SetLight go in one call for all light attributes, probably I should bring it here at once too? Just the test for that goes later in my patches when I test & implement effect state manager.