Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Grant, joenxxx), 9,921 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 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,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
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