Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by jcl. 04/20/24 08:52
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (7th_zorro, Aku_Aku, henrybane, flink, 1 invisible), 712 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bmap_blit apparently not blitting #456517
11/26/15 23:23
11/26/15 23:23
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
Problem: Trying to draw a large font map. Discovered that fonts will not draw in offscreen areas, even if they're directed to a render target larger than the screen. (e.g. part of the text will be cut off even if it's within the area of the bitmap)

Attempted solution: Draw the text on smaller bitmaps and then copy them to the four corners of the larger bitmap.

Success level: Half works. Rendering the draw-in-progress bitmaps to a panel shows that they are being written to with the correct content. However, when I set the panel bmap to the final target bitmap after the four bmap_blit instructions, I just get black.

Code:
targetMap = bmap_createblack(FONT_BMAP_SIZE, FONT_BMAP_SIZE, 24);
	bmap_zbuffer(fontmap);

	bmap_blit(targetMap, quad[0], vector(0, 0, 0), NULL);
	bmap_blit(targetMap, quad[1], vector(FONT_BMAP_SIZE/2, 0, 0), NULL);
	bmap_blit(targetMap, quad[2], vector(0, FONT_BMAP_SIZE/2, 0), NULL);
	bmap_blit(targetMap, quad[3], vector(FONT_BMAP_SIZE/2, FONT_BMAP_SIZE/2, 0), NULL);
	
		PANEL* p = pan_create(NULL, 100);
		set(p, SHOW);
		p.bmap = targetMap;



FONT_BMAP_SIZE is defined as 1024. Quad is an array of 4 bitmap pointers. Saying p.bmap = quad[0]; proves they have been initialized and rendered on. Is there something I'm doing wrong with the use of bmap_blit?

Re: bmap_blit apparently not blitting [Re: MatAllum] #456521
11/27/15 01:15
11/27/15 01:15

M
Malice
Unregistered
Malice
Unregistered
M



I have no real answer, other than it my be related to this bug in draw_quad larger then screen.
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=455240#Post455240

Mal

Re: bmap_blit apparently not blitting [Re: ] #456522
11/27/15 01:37
11/27/15 01:37
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
Even bmap_blit has that problem? Geez, that kinda sucks.

Re: bmap_blit apparently not blitting [Re: MatAllum] #456523
11/27/15 03:59
11/27/15 03:59

M
Malice
Unregistered
Malice
Unregistered
M



I never said it did, I said it may be a path for you to investigate. I put zero effort into your issue and didn't even look at the code. I just pointed to a possible relation.

Mal

Re: bmap_blit apparently not blitting [Re: MatAllum] #456537
11/27/15 16:48
11/27/15 16:48
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
I thought it was something related to the difference between a common bitmap and a render target but I can't reproduce the problem confused

Code:
vec_fill ( &screen_color, 128 );
bmap_zbuffer ( bmap_createblack ( 4096, 4096, 32 ) );
BMAP *bmpSource = bmap_createblack ( 1024, 1024, 24 );
BMAP *bmpTarget = bmap_createblack ( 4096, 4096, 24 );
draw_textmode ( "Arial", 0, 800, 100 );
bmap_rendertarget ( bmpSource, 0, 0 );
	draw_quad ( NULL, nullvector, NULL, vector(1024,1024,0), NULL, COLOR_GREEN, 100, 0 );
	draw_text ( "XYZ", 0, 0, COLOR_BLUE );
bmap_rendertarget ( NULL, 0, 0 );
bmap_blit ( bmpTarget, bmpSource, vector(3072,3072,0), vector(1024,1024,0) );




Last edited by txesmi; 11/27/15 16:49.
Re: bmap_blit apparently not blitting [Re: txesmi] #456551
11/28/15 06:12
11/28/15 06:12
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
The manual says:
Quote:

Bitmaps in special formats (except cubic environment maps), compressed DDS bmaps, or bitmaps used as render target can not be copied into.

but you could do the opposite, I guess...

But, my only idea is that txesmi is using 1 bmap_blit, you're using 4. Try 'wait(1)' between them?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: bmap_blit apparently not blitting [Re: EpsiloN] #456552
11/28/15 08:37
11/28/15 08:37
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
I duplicated bmap_blit with no waits and worked too.


Re: bmap_blit apparently not blitting [Re: txesmi] #456557
11/28/15 14:20
11/28/15 14:20

M
Malice
Unregistered
Malice
Unregistered
M



^--- Hum... Possible hardware/driver issue for the OP, then?

Re: bmap_blit apparently not blitting [Re: ] #456566
11/28/15 21:56
11/28/15 21:56
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
I've actually tested on two separate systems (Win 7 laptop and Win8.1 desktop) with same results. But I'll play with some of these responses and see where I can get.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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