Page 1 of 1

Can i dynamically change draw time for CreateLineFigure() ?

Posted: 16 May 2010, 11:36
by slogic
I created some lines with CreateLineFigure(). Lines has a handler - figure ID. I can postprocess some properties of lines by SetFigureColor(). But i see no way to control draw time dynamically. I can "turn off" my lines by setting alpha channel value to 0.0, but Spring still draws these lines and i'm getting a huge FPS drop.

Re: Can i dynamically change draw time for CreateLineFigure() ?

Posted: 16 May 2010, 13:17
by Kloot
Can't you just delete them at that point?

Code: Select all

int CreateLineFigure(float3, float3, float, int, int, int figureGroupId);
void DeleteFigureGroup(int figureGroupId);

Re: Can i dynamically change draw time for CreateLineFigure() ?

Posted: 16 May 2010, 14:57
by slogic
Really, that works, thanx. I was obsessed with draw time param :?

Re: Can i dynamically change draw time for CreateLineFigure() ?

Posted: 17 May 2010, 10:41
by slogic
Hm, is it possible to associate UnitDraw with figureGroupId also? Current implementation is not really usefull: you can specify draw time only.

Re: Can i dynamically change draw time for CreateLineFigure() ?

Posted: 23 May 2010, 14:24
by AF
I would advise the use of lua widgets and the lua<->AI callbacks with a gadget as a go between, it would sidestep all of this and provide a much larger range of visual debugging tools