Re: [AD] Changes to aWiki

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, 2006-02-17 at 19:35 +0530, Karthik Kumar wrote:
> Well...
> 
> That day, we were discussing on what's an AL_DISPLAY object and what's
> the AL_BITMAP object. The name is a little confusing. AL_DISPLAY is an
> object, which points to a display (like IDirectDraw7 *, or some other
> object which handles the creation of screen surfaces for us) ...
> AL_BITMAP *screen points to a screen surface that an user can draw to.
> (which may be drawn to the real screen sooner/later). 
> 
> We were thinking of doing something like:
> 
> AL_DISPLAY *createdisplay():
> void createsurfaces(AL_DISPLAY *display, AL_FORMAT *format,int
> surfacecount, AL_UPDATEMETHOD method);
> AL_BITMAP *getCurrentDrawSurface(AL_DISPLAY *display);
> void flip(AL_DISPLAY *display); //this change will be updated in the
> next call to getCurrentDrawSurface
> 

I think, in the original graphics API proposal, there is no clear
distinction between AL_DISPLAY and AL_BITMAP. In my previous reply with
the display state, it would be like this:

AL_DISPLAY is a render target, i.e. anything you can draw to, be it
"screen", part of a flipping chain, OpenGL, a texture, whatever.

An AL_BITMAP would just be a representation of a 2D area of pixels. You
could not read from it or write to it - you only could "blit" it as a
whole or partly (and maybe use as texture/pattern, in case we will have
such an API). Most (or all?) AL_BITMAP could be used as AL_DISPLAY
though, if you need direct access to them (the al_select_display_bitmap
function would be used for making a bitmap the current display).

I must admit though, my motivation for proposing such a simplified API
is, I could never understand the read_line/write_line or whatever things
in the current API, nor do I really grasp the "Direct Access" API in
Bob's proposal. Just setting an AL_BITMAP to be the current display
seems much more understandable.. and at least for an OpenGL driver,
could be directly implemented (whereas I'd have no idea how to code all
those "direct access" functions..).

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/