Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 533 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
After bmap_process missing text in the dest bitmap #481419
09/11/20 19:50
09/11/20 19:50
Joined: Aug 2003
Posts: 425
DocJoe Offline OP
Senior Member
DocJoe  Offline OP
Senior Member

Joined: Aug 2003
Posts: 425
If I use bmap_process(BMAP* bmDest, BMAP* bmSrc, MATERIAL* mtl); after copying text into a bmSrc, I miss the text in the bmDest.

A. First I copy a small bitmap into a big buffer bitmap...
Code
bmap_blit(bmapBuffer_800x600, bmapPhoto_40x40, vector(10,10,0), vector(0,0,0));  //I copy a photo into the buffer bitmap

B. 2nd I copy a text into the same big buffer bitmap...
Code
textHalloWorld.target_map = bmapBuffer_800x600; //I copy a text into the same buffer bitmap

As far the big buffer bitmap 'bmapBuffer_800x600' contains small bitmap 'bmapPhoto_40x40' as well as the text 'textHalloWorld'[i].

C.After using a shader on [i]'bmapBuffer_800x600'
and store the result in another bit bitmap 'bmapShader', the text is missing in the new 'bmapShader'.
Code
bmap_process(bmapShader, bmapBuffer_800x600, mtl_sepia); //text missing!


Don't take the cake to the party.
Re: After bmap_process missing text in the dest bitmap [Re: DocJoe] #481420
09/11/20 20:52
09/11/20 20:52
Joined: Aug 2003
Posts: 425
DocJoe Offline OP
Senior Member
DocJoe  Offline OP
Senior Member

Joined: Aug 2003
Posts: 425
proc_mode = PROC_EARLY; at the beginning of the function resolves the problem.
Code
proc_mode = PROC_EARLY
bmap_blit(bmapBuffer_800x600, bmapPhoto_40x40, vector(10,10,0), vector(0,0,0));  //I copy a photo into the buffer bitmap
textHalloWorld.target_map = bmapBuffer_800x600; //I copy a text into the same buffer bitmap
bmap_process(bmapShader, bmapBuffer_800x600, mtl_sepia); //use sepia shader onto bmapBuffer_800x600 and store result in bmapShader


Don't take the cake to the party.
Re: After bmap_process missing text in the dest bitmap [Re: DocJoe] #481421
09/11/20 21:25
09/11/20 21:25
Joined: Aug 2003
Posts: 425
DocJoe Offline OP
Senior Member
DocJoe  Offline OP
Senior Member

Joined: Aug 2003
Posts: 425
I was wrong - seems you have to wait 1 tick after you put in a text into a bitmap before you use bmap_process();.
Code
bmap_blit(bmapBuffer_800x600, bmapPhoto_40x40, vector(10,10,0), vector(0,0,0));  //I copy a photo into the buffer bitmap
textHalloWorld.target_map = bmapBuffer_800x600; //I copy a text into the same buffer bitmap

wait(1);

bmap_process(bmapShader, bmapBuffer_800x600, mtl_sepia); //use sepia shader onto bmapBuffer_800x600 and store result in bmapShader


Don't take the cake to the party.
Re: After bmap_process missing text in the dest bitmap [Re: DocJoe] #481454
09/18/20 10:56
09/18/20 10:56
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I think the tick is needed for blitting the text into the bitmap.


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