Proyecting TEXT* onto a flat entity

Posted By: Attila

Proyecting TEXT* onto a flat entity - 01/22/09 19:10

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
Posted By: Attila

Re: Proyecting TEXT* onto a flat entity - 01/23/09 13:20

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.
Posted By: Cowabanga

Re: Proyecting TEXT* onto a flat entity - 01/23/09 13:23

You don't have enough video memory.
Posted By: Attila

Re: Proyecting TEXT* onto a flat entity - 02/02/09 22:58

... 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.
© 2023 lite-C Forums