On Sun, 23 Dec 2001, Andreas Reich wrote:

> Christoph Egger ([EMAIL PROTECTED]) wrote:
> > On Sun, 23 Dec 2001, Andreas Reich wrote:
>
> Hi Christoph,
>
> > ggiSetOrigin() is used for panning on a virtual screen. For example, when
> > you write a flipper game... :)
>
> but it *would* be possible to simulate double-buffering like this:
> 1.) SetMode() to 800x600, virtual 1600x600
> 2.) Draw on the left 800x600 part of the virtual screen
> 3.) SetOrigin() to 0,0
> 4.) Draw on the right 800x600 part of the virtual screen
> 5.) SetOrigin() to 800,0
> 6.) GOTO 2.)
> Right?

No. The right way is:

1.) ggiSetMode() to 800x600, virtual 1600x600
2.) Draw on the virtual screen
3.) ggiSetOrigin() lets you scroll without redrawing things.
4.) GOTO 2.)

Use the manual pages for more information (man ggiSetOrigin).

> >> Is it a good solution to use DirectBuffer and memcpy()?
> > Or would that be too slow?
> > No. It's ok for i386, but it's too fast for the PPC. :-) See above.
>
> That's OK. I'm working on a windowing library for our own embedded
> systems, and we'll probably never use a PPC in there.

Cool. Which device do you use exactly?

> So I'll try DirectFB first (like you wrote in your private mail)

Note: You don't need to install DirectFB. You only need the binary
drivers.

And: You have to tell libggi's fbdev target, where it can find them.
A short guide:

1.) ./configure --with-directfb=DIR (find directfb drivers modules in DIR)
2.) make
3.) make install

> and then the memcpy() solution.

:-)


CU,

Christoph Egger
E-Mail: [EMAIL PROTECTED]

Reply via email to