Index: [thread] [date] [subject] [author]
  From: tdphette <tdphette@dexter.glaci.com>
  To  : ggi-develop@eskimo.com
  Date: Sun, 30 May 1999 15:01:04 -0500

BlitOp Implementation

OK, I'm making good progress on the blit code, but before
I implement too much, I've got some questions.

libggi2d/default/stubs/blit.c looks to be place to implement
BlitOp and friends.  As this would be the lowest common
denominator fallback code, I assume it should just use
GetPixel and PutPixel to do its thing.

However, I am interested in using direct buffer access to get
as much speed as possible.  I've already written the following
function:

void dbFastBlit( ggi_directbuffer *src, int sx, int sy, int sw,
                 int sh, ggi_directbuffer *dst, int dx, int dy )

This is a quick and dirty function that operates on two direct
buffers and copies a rectangle from one to the other.  It
assumes that the color palettes etc are the same for both
visuals.  When both visuals are in video ram, this is very
fast (MUCH more so than when the pixel is temporarily buffered
while being copied).  It should be trivial to modify this
to check the alpha value when copying... bingo, I've got
transparent blitting.  This is fine for getting my game
engine up and running, but I would also like to give something
back to the GGI project.

My question is, what is the proper home for this code in GGI?
My gut tells me it should NOT go in the default BlitOp stub.

Later,

Thad

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