Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, Ayumi, VHX, monarch), 1,161 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Proyecting TEXT* onto a flat entity #247819
01/22/09 19:10
01/22/09 19:10
Joined: Dec 2005
Posts: 22
A
Attila Offline OP
Newbie
Attila  Offline OP
Newbie
A

Joined: Dec 2005
Posts: 22
HI,

I'm trying to show content of a TEXT* pointer on a box entity.
I use this code:

text.target_map = bmap_for_entity(box_entity, 0);

... and it works just find, BUT...
if I change the string in the text, with each change the engine just paints over the previous text leaving all previous texture visible and unreadable.
I only want to show the original texture and the last string of the text.

Any help would be apreciated.
Regards

Re: Proyecting TEXT* onto a flat entity [Re: Attila] #247926
01/23/09 13:20
01/23/09 13:20
Joined: Dec 2005
Posts: 22
A
Attila Offline OP
Newbie
Attila  Offline OP
Newbie
A

Joined: Dec 2005
Posts: 22
I have tried to use

bmap_purge(bmap_for_entity(box_entity, 0));

which restores the original bitmap of my entity, but after a couple of seconds it fills up the videomemory and the engine crashes with this error:

D3Derror:D3DERR_OUTOFVIDEOMEMORY

Please send me some code to solve this...
Thanks.

Re: Proyecting TEXT* onto a flat entity [Re: Attila] #247927
01/23/09 13:23
01/23/09 13:23
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
You don't have enough video memory.

Re: Proyecting TEXT* onto a flat entity [Re: Cowabanga] #249510
02/02/09 22:58
02/02/09 22:58
Joined: Dec 2005
Posts: 22
A
Attila Offline OP
Newbie
Attila  Offline OP
Newbie
A

Joined: Dec 2005
Posts: 22
... then I answer my own question:

I used ent_cloneskin to make a copy of the bitmap used by my entities,
and since there is bug in 7.66 engine I used vec_to_uv to correct the bug.

then I created a new black bitmap, copy the content of the original bitmap of my entity into the new bitmap with bmap_blit.

then I used ent_setskin to assign the new bitmap to the box entity.

that solved the problem.
thanks to all who tried to help and sorry for my bad english.
Regards.


Moderated by  HeelX, Spirit 

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