Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, TipmyPip, OptimusPrime), 15,359 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
draw_target #206757
05/15/08 14:40
05/15/08 14:40
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
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


Re: draw_target [Re: sheefo] #206881
05/16/08 10:13
05/16/08 10:13
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Yes, this was already suggested some time ago and is on my list.

Re: draw_target [Re: jcl] #206909
05/16/08 13:19
05/16/08 13:19
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Cool! Thanks! smile


Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1