On Mon, 18 Jun 2001, Brian S. Julin wrote:
> On Mon, 18 Jun 2001, Christoph Egger wrote:
> > 1. How can I check the size, if it will work _before_ acquiring it
> > such as I can check a certain resolution against ggiCheckMode(),
> > if it will work or not ?
>
> What you are saying is that you want to have a directbuffer
> before you have set the mode? This is not possible.
No, not before setting the mode. I wanna check, if I can get a
directbuffer with a certain size after the mode is set, but before
acquiring the db.
But now, I think, this is also not possible, because you say below,
that the db has always the same size as the video mode.
> > 2. After I have determined a size, which should work, I wanna acquire
> > the directbuffer with the certain size. How can I do that?
>
> Directbuffers are always the size required by the video mode, you
> don't set/get the directbuffer's size. The directbuffer doesn't
> take any actual space, only the space required by the struct --
> the actual window is either a MMIO mapping into VRAM, or it is a
> RAM backbuffer that is used by the visual whether or not you use
> it as a directbuffer, or it is simply not available on that
> target.
OK, so far. But how can I get the pixelformat of it? Or is a db
something like a raw buffer stored in VRAM?
> > 3. Then I wanna release it again. Have I something special to do
> > before I can release it with ggiResourceRelease()?
>
> The ResourceRelease is just there to inform other threads that
> you are currently accessing using the DirectBuffer, so they do
> not start any accelerator commands. It doesn't alloc/dealloc
> anything.
Looking in libggi's glide-target, I can see, it tries to get a
buffer space from the glide-driver, so ggiResourceAquire() _does_
allocate something. And ggiResourceRelease() releases it.
CU,
Christoph Egger
E-Mail: [EMAIL PROTECTED]