Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, SBGuy, TipmyPip, ozgur), 864 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | 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