> hi there. you probably remember that i was writing a terminal emulator
> in ggi/freetype2. well, i never released it partly because it is quite
> slow right now when scrolling. so my question is: what is the fastest
> way to draw a character in a visual (mostly fbdev and x11)?
I you render the character through freetype, the fastest way is probably
direct buffer access if available and Getbox/Putbox if not.
> i will normally have an array where array[row][col] is the index of some
> color. do i blit? do i simply ggiPutPixel every time?
No - Putpixel has a large calling overhead, Try at least using the boxed
functions if possible (which it should for a Terminal - this might differ
for a wordprocessor or some such which does Kerning ...).
This saves the overhead of 127 function calls for the average 8x16 font.
> right now i'm ggiPutPixel'ing for every character. it is slow,
> specially in x11. for pure scrolling i've tried ggiCopyBox, but it is
> very very very slow in the framebuffer.
This is strange. What kind of framebuffer ? There might be a few buffers
that suffer heavily from _reading_ them, but usually it should be pretty
quick.
For scrolling the best things to do are 1. using a larger virtual size
and ggiSetOrigin and/or ggiSetSplitline . 2. using CopyBox and
3. Reblitting everything.
> rxvt scrolls very fast, and my emulator doesn't.
Note, that many X-emulators can "jumpscroll" i.e. they scroll several lines
at once by slightly buffering input and processing it all before redrawing
...
CU, Andy
--
= Andreas Beck | Email : <[EMAIL PROTECTED]> =