Index: [thread] [date] [subject] [author]
  From: Alexander Larsson <alla@lysator.liu.se>
  To  : ggi-develop@eskimo.com
  Date: Sun, 12 Jul 1998 20:24:25 +0200

Frames...

I was bored for a second and thought that i should port the newly released 
snes9x to ggi, but then i realized that libggi was in for a bit of change 
right now...

So i decided to implement Frames in libggi according to 2.9 in 
libggi-issues.txt. I have just begun looking at it, thinking i could start 
with the X-target, but i immediately found a problem that can possible break a 
lot of things..

The linear libraries does a lot of stuff like this:
 
*(((uint16 *)LIBGGI_FB_LINEAR(vis))+y*LIBGGI_FB_WIDTH(vis)+x)=col;
and 
*pixel=*(((uint16 *)LIBGGI_FB_LINEAR(vis))+y*LIBGGI_FB_WIDTH(vis)+x);

This is all nice and dandy with the current implementations, but according to 
the following from libggi-issues.txt it is wrong:

  o  Three additional functions are required, to switch between these
     frames for drawing, reading back (ggiGet*) and for displaying,
     e.g.:

  o  ggiSetDisplayFrame(vis, int frameno);

  o  ggiSetWriteFrame(vis, int frameno);

  o  ggiSetReadFrame(vis, int frameno);


This gives a problem. I must have to pointers to the linear buffer, one for 
reading and one for writing to make this possible.

This calls for a change in ggi_info_fb, split 'linear' into linear_read and 
linear_write. Also the LIBGGI_FB_LINEAR(vis) macro needs to be split into two.
This will mean binary incompatibility...

What shall i do?

/ Alex





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