Ben Bogart - FMPM/F1999 wrote:
My SDL external blits and updates the render window each time the "blender_alpha" method is called (by the alpha selector). As far as I can tell the render speed is quite sufficient, but seems to lag behind what the number box is doing. Its like my number box goes through a pipe object before it gets to the external. Its just not quite as responsive as i would like. Is it more likely my SDL rendering speed or does an external have a built-in input buffer causing the lag? Here is my blender_setup function:
when you heavily drag your number-box you get quite a lot of numbers within a short period. (like 200 per sec, depending on your mouse-speed) you then will call the SDL-call 200 times per sec. this is much calculation !
maybe you should try throttling down the calls to blender_alpha with a timer or something. a maximum of 20 blendings/second should be enough
While I'm on the topic, what is the proper way to create a deconstructor function? (to close my SDL process when PD closes) I tried passing (t_newmethod)sdl_close as the 3rd argument to my class_new function, but that causes the following compile error:
blender.c: In function `blender_setup': blender.c:82: warning: passing arg 3 of `class_new' from incompatible pointer type
it's a (t_method) not a (t_newmethod)
mfg.cds.r IOhannes