OpenAmiga (443/964)

From:Matthew Kille
Date:16 Sep 2000 at 00:00:22
Subject:Re: AMIOPEN: Dev Questions

Hi Rudi,

On 15-Sep-00, Rudi Chiarito wrote:

>> Q: How can pixels be directly written to a pixmap frame buffer?

> You're not supposed to do that, it's illegal! Unless you are creating
> your own pixmap class, in that case of course you can go direct to the
> pixel buffer, how else do you plot anything. ;)

> You should be using the pixmap API to plot to a pixmap. Otherwise your
> program won't make use of native/accelerated tools when available.

> Although it's illegal to write directly to a pixmap buffer, you have an
> option in some cases. You can allocate yourself memory for your internal
> buffer, write to it as needed and then create a pixmap out of it, by
> passing its pointer as the first argument to ave/avo/pix/*bit/open (check
> <ave/avo/pix/api.html>). After that, though, it's not a good idea to keep
> writing in the buffer bypassing the pixmap API.

This is an interesting point. There will always be situations where people
will want to write directly to their own pixmap. (As you know, Tunnel does
this.) Will there be a special 'volatile pixmap' API that allows people to
do this legally? It would be a good idea...

(BTW: Great answers to the questions. Very clear and to the point.) :)



Matt.

Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html