Re: [AD] OpenGL

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


On Thu, 2006-07-27 at 15:28 -0700, Robert Ohannessian wrote:
> I'll reiterate Shawn's point on the topic: It's best to think that
> everything is a BITMAP.
> 

Well, in my view, I do not usually draw to a BITMAP so much, as to a
DISPLAY (or surface, target, whatever you want to call it).

I think, there are three basic use scenarios for the new graphics API
(all of which can be combined of course):

1. Pixel/Bitmap view. Users who use 320x240 or some other fixed
resolution, and commands like al_putpixel, al_blit, al_line,
al_getpixel. Just what you get with vanilla Allegro 4.2 when not using
video bitmaps.

2. Sprites view. Users who will mainly use al_blit to do 2D graphics,
probably expecting to be able to get accelerated blending effects as
well as rotation and stretching. (Can't remember if we were going to
have additional transformations in the new graphisc API right now.)

3. OpenGL view. Use the OpenGL API, which is vastly superior[*] to
Allegro's, with the possibility to combine it with the above. I somehow
have a feeling that 90% of users will prefer this, for example something
like OpenLayer would sit on top of this as well.

And the "everything is a BITMAP" view would basically be limited to #1,
which is the least useful scenario.. pixel-oriented commands aligned to
integer pixel boundaries.

If we use a DISPLAY parameter, and also make it implicit like Peter Hull
said, then everything will work the same for all three scenarios,
without any hacks (and it would also solve the source/destination
parameter confusion of blit).



[*] For example, try to make a most simple 2D scroller with integer-only
display coordinates, as is the only possibility in Allegro 4.2. It will
never look as smooth as one which uses proper interpolation with
floating point positions. (And even though internally, OpenGL has to use
a fixed resolution and at the end produce pixels as well, this is not
the view the user has of it.)

-- 
Elias Pschernig






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