Page 1 of 1

RGBA fonts...

PostPosted: Mar 8, 2010 @ 4:45pm
by fella
Hello everybody
I have to use anti-aliased fonts into my OpenGL project but edge API doesn't seem to support DrawFontWrap on RGBA texture...
So I developed my own RGBA font drawing tool computing the positions and size of each letter of the font and making several blits between my destination surface and the RGBA font source before uploading the final surface to OpenGl.
However the library does not perform BltFast between RGBA surfaces.
Thus I was forced to copy the surface pixel by pixel (using Lock() & Unlock() functions ) between my surfaces.
This process is relatively long, especially when this treatment needs be carried out during a game session...

How could I accelerate the blit process between multiple RGBA surfaces?

Do you plan to incorporate this feature in a future release ;-) ?

Best

PostPosted: Mar 12, 2010 @ 7:15pm
by edge
Hi,

If you're using OpenGL, then drawing a font to a surface won't be necessary. Just use display->DrawFont (with your RGBA surface that loaded a PNG font image) and you should be set.

Johan

Re: RGBA fonts...

PostPosted: Jul 29, 2010 @ 12:21pm
by fella
Sorry for my late reply... :oops:

I cant use displayer->BuildFont for several reasons :
- I need to perform a BuildFontWrap to allow my text to fit in a defined area.
- I need to use a surface to crop my text (in my box) and provide up/down sliders
So, to to this I've done my own BuildFontWrap function (RGBA => RGBA). :/

But we can't perform a blit between 2 RGBA surfaces, so I had to do my blit function using pixel by pixel copy.
This way is to slow. :(

So do you plain to make a E2DSurfaceRGBA.BuildFontWrap(...) function or/and add blit function between RGBA surfaces? :cry:

Thanks
Fella

Re: RGBA fonts...

PostPosted: Jul 30, 2010 @ 5:34pm
by edge
Hi Fella.

We understand this is a quite an important feature currently missing in EDGELIB, however we don't have this on our agenda for the very short term. Sorry about that.

Wouter