[LispM-Hackers] YA graphics library, but this might be the one...

James A. Crippen james@UnLambda.COM
Wed, 4 Apr 2001 18:36:36 -0800 (AKDT)


Hmm... Here's some glossy data on SDL from the intro on their web page...  
I've elided the irrelevant parts.

---8<---

Video
o 8bpp or greater, optional conversion if not hardware supported
  depth.
o Write directly to a linear gfx framebuffer.
o Surface blits converted to tgt format using optimized blitters with hw
  accel when possible, MMX optimizations available for x86.
o Hardware accel blit and fill ops used if supported by hardware.

Events
o Application visibility changes.
o Keyboard input.
o Mouse input.
o User requested quit.
o {Dis,En}able with SDL_EventState().
o Events passed thru user-spec filter function before posting to event Q.
o Thread-safe event Q.

Audio
(It does audio.  We can emulate the crude little 8bit mono audio that the
Exploder had, if we want.)

Threads
o Simple thread creation API.
o Simple binary semaphores for sync.

Timers
o Number of msec elapsed.
o Wait specified msec.
o Set a periodic timer with 10msec resolution.

Endian Independence
o Detect endianness of system.
o Routines for fast swapping of data.
o Read and write data in specified endianness.

---8<---

I dunno, this looks pretty good to me, especially considering the
portability...  But I do note that ports to Solaris, IRIX, FreeBSD, QNX,
and OSF1/DUX/Tru64 are unofficial ports in progress.  So only the Linux,
Win32, BeOS, and MacOS [X] ports are officially working in all cases.

If at least simple unaccelerated 2d graphics and events work for all the
ported (or porting) platforms then it's already sufficient to start work
with.

What does everyone else think, before I jump the gun on it?

Looking at http://www.libsdl.org/intro/usinginit.html and
http://www.libsdl.org/intro/usingvideo.html a lot of what we want looks
like cookbookery.  I'm almost tempted to start a e3Gfx class right now...

Hehehe.... http://www.libsdl.org/opengl/intro.html means we could easily
extend the macroops someday to do OpenGL 3D which would just kick serious
ass over the fscking Symbolics FrameThrower and for 3D rendering (at least
with the right hardware running under IRIX).  We'd have to write a new
3D studio...  I wonder if Nichimen would be interested? :)

I see serious growth potential in the future with this lib.

'james

-- 
James A. Crippen <james@unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.