home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20028 comp.lang.c++:19695
- Path: sparky!uunet!noc.near.net!news.centerline.com!jimf
- From: jimf@centerline.com (Jim Frost)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Graphics
- Date: 21 Jan 1993 20:31:01 GMT
- Organization: CenterLine Software, Inc.
- Lines: 62
- Message-ID: <1jn166INN535@armory.centerline.com>
- References: <1jko2nINNnmh@msuinfo.cl.msu.edu>
- NNTP-Posting-Host: 140.239.3.202
-
- learman@cps.msu.edu (Jerome M Learman) writes:
- >I what to do some graphical programming and I want to get some comments on a
- >couple of things. I want to you high quality graphics VGA or SVGA.
-
- Hmm, VGA and SVGA are hardly what I'd call high quality, but then
- again I'm a snob :-).
-
- >What is best to use for portabilty between unix and ibm compatablies?
-
- There are very few graphics packages that are portable between them (I
- know of none I'd recommend). What I've done in the past to handle
- graphics portability is to write my own graphics description layer and
- then port *that*. Depending on what you need it can be a lot of work
- though.
-
- In a previous life I wrote a "portable" object-based graphics library
- under X11 that myself and a co-worker ported to SGI GL in about a day
- and tuned in a week. That library was rather complicated (it
- supported object collision detection and multiple overlays in software
- along with a healty supply of graphics primitives and extremely
- efficient repainting) and it took some months to write and debug, but
- simpler drawing libraries wouldn't be so hard. If you keep the
- necessary primitives to a minimum the porting task isn't too hard, as
- demonstrated by the fact that we ported our library so quickly.
-
- Without a set of graphics primitives for DOS machines it would be a
- big hassle, though.
-
- >I have use Xview for but I believe this is exclusive to X windows.
-
- Xview is based on SunView and it's rather primitive. It's good for
- simple applications but isn't particularly good for anything more
- complicated. It's certainly not the least bit portable.
-
- >What is exactly is motiff?
-
- Motif is a look-and-feel specification. There's a library that
- implements a bunch of Xt widgets which implement the Motif
- specification that's also commonly called "Motif." It's not portable
- either and it doesn't implement generic graphics commands.
-
- >What did the best way to create motion?
-
- There are a couple of "best" ways, depending on what you're working
- with and what you need to do. The most generic way is to
- double-buffer -- you set the display up with two frame buffers, draw
- on the one that's not visible, then make it visible while you draw on
- the other one. Most good graphics hardware has double-buffering
- capability, but almost no X servers support this capability and I
- don't think VGA/SVGA does either. Without double-buffering the best
- you can do is to draw onto an area that's not in the frame buffer (an
- X Pixmap or an area in memory, for instance) and then blit it onto the
- display. If the object's not very big and you limit your blit to the
- size of the object it'll work fairly well. Given the limited
- resolution of SVGA I think it'd work quite well.
-
- There are a lot of other techniques for accomplishing animation that
- aren't as general; if you're really interested in the topic you should
- hit your local library for some books.
-
- jim frost
- jimf@centerline.com
-