Gamestudio Links
Zorro Links
Newest Posts
Historical Data with the 64bit FXCM Plugin
by Martin_HH. 01/27/26 20:13
SGT_FW
by Aku_Aku. 01/27/26 15:10
ZorroGPT
by TipmyPip. 01/27/26 06:01
Buy A8 Pro Version
by Ezzett. 01/26/26 14:22
Zorro version 3.0 prerelease!
by jcl. 01/23/26 14:47
C++ direct start requires Zorro S
by jcl. 01/23/26 14:29
MRC.c and WFO
by 11honza11. 01/22/26 10:33
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (SBGuy), 6,973 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Sfrdragon, mayarik, Castromangos, Quantum, stephensdeborah
19195 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bmap_rendertarget problem #407747
09/18/12 20:30
09/18/12 20:30
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi,
it looks that bmap_rendertarget does not clear its previous content with mode=0 as manual says.

Quote:
Mode for a normal render target bitmap, 1 = preserve previous content, 0 = clear previous content


here is an isolated example
Code:
#include <acknex.h>

BMAP *bmpRT;

function Render_to_bmap ()
{
	bmap_rendertarget ( bmpRT, 0, 0 );
	draw_quad ( NULL, vector(random(224),random(224),0), NULL, vector(32,32,0), NULL, vector(random(255),random(255),random(255)), 100, 0 );
	bmap_rendertarget ( NULL, 0, 0 );
}

function main()
{
	video_set ( 256, 256, 32, 2 );
	wait(3);
	bmpRT = bmap_createblack ( 256, 256, 32 );
	PANEL *panRT = pan_create ( "", 1 );
	panRT.bmap = bmpRT;
	panRT.flags |= SHOW;
	on_space = Render_to_bmap;
	while ( !key_esc ) wait(1);
	sys_exit(NULL);
}



is this a bug or a missundertanding?

thanks in advance,
txes

edited________________
I found the workaround

Code:
function Render_to_bmap ()
{
	bmap_rendertarget ( bmpRT, 0, 0 );
	wait(1);
	draw_quad ( NULL, vector(random(224),random(224),0), NULL, vector(32,32,0), NULL, vector(random(255),random(255),random(255)), 100, 0 );
	bmap_rendertarget ( NULL, 0, 0 );
}


but a bit weird.

Salud!

Last edited by txesmi; 09/18/12 21:24.
Re: bmap_rendertarget problem [Re: txesmi] #408226
09/27/12 17:40
09/27/12 17:40
Joined: Jul 2000
Posts: 28,058
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,058
Frankfurt
Thanks, it's not supposed to behave this way - this will be fixed.


Moderated by  jcl, Nems, Spirit, Tobias 

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