Re: [AD] Additional graphics primitives API |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Additional graphics primitives API
- From: Elias Pschernig <elias@xxxxxxxxxx>
- Date: Sat, 09 Feb 2008 20:53:43 +0100
> Shapes such as triangles, rectangles, and lines are almost trivial to
> draw in memory and opengl. They'll be pretty small functions on all
> systems and they should probably be in the core.
>
> Curved ones such as circle are really hard to do in opengl (with
> precision) but rather easy to do in memory. Maybe the best option for
> circle is to draw a rectangle and then map a "texture" of a circle.
> Some sort of mip-map or caching system would be useful.
A way as "trivial" as for triangle to draw a circle is like in 4.2.x,
calculate the left and right outlines and connect them with horizontal
spans.
> A question for later.. but does the glx and d3d drawing routines still
> get used even without a hardware driver? ie: does d3d and ogl default
> to software rendering?
No. They only get used when drawing to the main display or to bitmaps
which are not forced into memory mode with the ALLEGRO_MEMORY flag. They
also are used as fallback when drawing to a bitmap, but the driver does
not support offscreen surfaces (e.g. no framebuffer object extension in
the case of OpenGL).
The way we use no anti-aliasing and subpixel precision, software and
hardware results are supposed to be 100% identical, pixel-by-pixel,
though.
--
Elias Pschernig <elias@xxxxxxxxxx>