[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Allocation of video RAM
31 maj 2010 kl. 15.54 skrev Jo Even Skarstein:
> --------------------------------------------------
> From: "Peter Persson" <pep.fishmoose@gmail.com>
> Sent: Monday, May 31, 2010 2:38 PM
> To: "Jo Even Skarstein" <joska@online.no>
> Cc: <mint@lists.fishpool.fi>
> Subject: Re: [MiNT] Allocation of video RAM
>
>> It's also important to accept the fact that many coders around does not want to use the VDI. They want a framebuffer
>> that they can draw to directly, and they may want VRAM buffers for sprites etc. Trying to force these guys into using
>> the VDI will only put them off, and it just won't happen. They'll chose another way to do things, or ignore the platform.
>> If there is a clean alternative which still works with the way these coders work, that clean alternative will be used.
>
> Well, the advantage of offscreen bitmaps is that you can either write directly to it or have the VDI draw to it. So you can use both. You can allocate an offscreen bitmap at the size and pixel layout of the physical screen, and then point physbase to this bitmap. Then you can draw directly to the screen legally, and even combine it with using the VDI to blit sprites from other offscreen bitmaps while taking advantage from any hardware acceleration provided by the VDI.
I don't think one rules out the other. TOS/FreeMiNT does have a layered structure, and I can't see why one should break that approach if it isn't for a very good reason. Maybe I'm completely lost, but does it really make sense to implement low level functions in a higher level API such as the VDI?
Does fVDI have a built-in memory allocator? I've been browsing the sources for a while, and I can't find it (maybe it's too obvious and I've missed it).
> If someone wants to use VRAM for sprite buffers, can they take advantage of fast VRAM->VRAM blits without writing directly to the hardware or use some sort of driver (VDI)?
No of course they'll need driver functionality or some easy to use API for that, and that may very well be the VDI. But the VDI does afaik not cater for texture mapping, or even alpha blits.
-- PeP