Using Text on a Texturebuffer

Blitz3D Forums/Blitz3D Programming/Using Text on a Texturebuffer

yinch(Posted 2003) [#1]
I am during some shapes and then some text onto a texturebuffer. Using
Setbuffer(Texturebuffer(Tx))

When the texture is created without the VRAM flag set, everything works by the framerate drops noticeably.

So obviously I include the VRAM flag(+256) to use faster VRAM for the textures. This runs much faster but NOW the text has a block of black around each word. grrrrrrrrr.

Any recommendations?

yinch'03


Beaker(Posted 2003) [#2]
Use FONText. :)

Drawing text and shapes to a texture is always going to be unreliable, even if it works ok on your machine. At the very least you would be better off writing the text to the backbuffer and the copying it to the texture.

It is preferable to keep everything in the 3D realm - 3D. This is for speed and compatibility.

Either create your texture before you need it in a paint program, or use WritePixel commands to edit the texture into a usable state.

Or use a system like FONText, that comes with all the commands you need to draw text and primitives using 3D commands only.

More info