Index: [thread] [date] [subject] [author]
  From: Andreas Beck <becka@rz.uni-duesseldorf.de>
  To  : Terry 'Mongoose' Hendrix <stu7440@westga.edu>
  Date: Thu, 17 Jun 1999 19:51:49 +0200

Re: First ggi project, need help

> >If these repeatedly draw to the same regions, this can cause flashing.
> >Calling Flush() is a NOOP on directly mapped targets like fbcon.

> I may have forgot to mention I was X target.  

Ah. On the X target, ggiFlush() in deed _does_ flush the screen.
On X enabling ASYNC mode might cure your problem, as there will be no
interfering automatic syncs, then.

> oops.  Ggi svga wrapper locks up on me, 

Take care about the vocabulary here: the SVGAlib _wrapper_ is the lib that
lets SVGAlib apps run on LibGGI. The SVGAlib _target_ is what makes LibGGI
display via a true SVGAlib.

> and the matrox fb seems to be worse.

Regarding blinking ? Yes, that is due to the way you draw probably.

Can you put up the source somewhere, so we can have a look ?

> I'm generally drawing a 640x480 image from a ggi buffer in memory, then
> drawing other images over that for docks, text, and buttons.  I haven't
> got scaling started yet, so this is 1:1 drawing. 

So you probably see the "old" gadgets get overwritten by the background,
and the reappearing - right ?
You will either have to use doublebuffering or a clever updating scheme,
that only updates what must be updated.

A very simple way would be to draw on a memvisual and then crossblit it to
screen.

> Oh...  I'm using ggi for svga/win32/x11 portability.  I guess I need to
> grep the headers.  =/

Oh yes ... good you remind me of it ... got to hack some win :-) ...

> >Hmm - you're not the first to notice that ... Seems we need to write
> >something up. We expected people to do what most of us would do ...
> >ignore the docs and look at some sample code ...

> I used all the sample code I could find, it's just I can't find sprite
> like methods for ggi. 

Yes. LibGGI is very basic. It has no sprite methods. This is scheduled for
an extension ... I'll try to get into that business with Marcus ASAP.

CU, ANdy

> I'm tring to write my own, but I have no book on
> grpahics and I can't find detailed API docs. 

Simple BOBs should be relatively trivial. Basically you go through then
pixel by pixel and blit if the color is not the "transparent" key color.
The cube3d demo shows some ways to do it.

> >BTW: I started writing a file called "The big dummies guide to graphics 
> >programming" a while ago ... I haven't worked on it for quite some time 
> >... anyone here to take it an improve it ?

> Are you going to release that as a living document to the ggi list?
> Living documents for programming guides are always very helpful.  If you
> send out copies I'll take one.  ;)

I'll upload it into the repository. Should appear in the snapshots, then.

CU, ANdy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

Index: [thread] [date] [subject] [author]