Posted By: txesmi
bmap_rendertarget problem - 09/18/12 20:30
Hi,
it looks that bmap_rendertarget does not clear its previous content with mode=0 as manual says.
here is an isolated example
is this a bug or a missundertanding?
thanks in advance,
txes
edited________________
I found the workaround
but a bit weird.
Salud!
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!