draw_target

Posted By: sheefo

draw_target - 05/15/08 14:40

Is it possible to implement a "draw_target" function which you can pass a BMAP* as a render target, then all calls to 'draw_' functions will be rendered onto the BMAP*. If you pass NULL to the function it resets to normal rendering.

Code:
void draw_target(BMAP*);
//...
draw_target(pRenderTarget); // Set a render target
draw_line(vector(x1,y1,0),NULL,100);
draw_line(vector(x2,y1,0),_vec(0,0,255),100);
draw_line(vector(x2,y2,0),_vec(0,0,255),100);
draw_line(vector(x1,y2,0),_vec(0,0,255),100);
draw_line(vector(x1,y1,0),_vec(0,0,255),100);
draw_target(NULL); // Reset render target

Posted By: jcl

Re: draw_target - 05/16/08 10:13

Yes, this was already suggested some time ago and is on my list.
Posted By: sheefo

Re: draw_target - 05/16/08 13:19

Cool! Thanks! smile
© 2024 lite-C Forums