Layer parameter pixel: best access method
Hi guys,
I m using the layer parameters in some effects, and it works well.
Still, I use two methods to do that.
First method:
PF_ParamDef def;
| AEFX_CLR_STRUCT(def); | |||||||
| ERR(PF_CHECKOUT_PARAM( | in_data, | ||||||
| layerID, | |||||||
| in_data->current_time, | |||||||
| in_data->time_step, | |||||||
| in_data->time_scale, | |||||||
| &(def))); |
PF_EffectWorld myLayer= def.u.ld;
ERR2(PF_CHECKIN_PARAM(in_data, &(def)));
PF_COPY(&myLayer, output, NULL, NULL);
Second method:
in PreRender callback:
| extraP->cb->checkout_layer( | in_dataP->effect_ref, | ||||||||
| layerID, | |||||||||
| layerID, | |||||||||
| &req, | |||||||||
| in_dataP->current_time, | |||||||||
| in_dataP->time_step, | |||||||||
| in_dataP->time_scale, | |||||||||
| &ck_result)) |
in Render callback
PF_EffectWorld myLayer*;
ERR(extraP->cb->checkout_layer_pixels(in_data->effect_ref, layerID, &myLayer));
PF_COPY(myLayer, output, NULL, NULL);
extraP->cb->checkin_layer_pixels(in_data->effect_ref, layerID);
If I read the documentation well, the Second method is the right method. Still the first method works fine...
I m wondering if they are equivalent and if I may encouter some problem with either on of those method...
Thanks for any shared experience.