nanogui: Alpha channel whit nano-x 0.91


Previous by date: 10 May 2006 07:12:49 +0100 Re: TinyGL0.4 linking issues, Greg Haerr
Next by date: 10 May 2006 07:12:49 +0100 How to use animated gifs?, ofi
Previous in thread: 10 May 2006 07:12:49 +0100 Alpha channel whit nano-x 0.91, Marco Rossi
Next in thread:

Subject: Re: [nanogui] Alpha channel whit nano-x 0.91
From: "Greg Haerr" ####@####.####
Date: 10 May 2006 07:12:49 +0100
Message-Id: <16c201c673f8$c112db80$6401a8c0@winXP>

: ::You'll need some slight modifications to the PNG decoder
: ::in engine/image_png.c.  When the PNG has an alpha channel,
: ::you'll need the code to do the following (but only in that case):
: ::This should result in a ARGB-code image file.
:
: I have executed your instructions (also I have set 32bpp because with
24bpp
: I had an segmentation foult error )
: but the result is one full image without transparencies.
:
: In order to visualize the rows I have used the functions GrDrawImageToFit
: and GrDrawImageFromFile.
: I am working on  Linux PC whit framebuffer.

First, this only results in an ARGB decoded image.  Now
you've got to display the alpha channel image.  Note that
nano-X doesn't really support software alpha, the alpha
patch was for hardware alpha support.  However, there
are some functions that will work with software alpha.
One of these is GrCopyArea, where the mode parameter
can use alpha channel.  (look up the list of allowed values
in the include header file).  However - there's still more
problems, because I don't think any of the image functions
support software alpha, only the GdBlit function, which
GrCopyArea uses.  So you'll need to trace the code
path a bit: look at engine/devdraw.c::GdDrawImage()
and see whether it supports software alpha, or
whether it calls a new lower level driver function
DrawArea, which might implement software alpha.

Hope this helps

Regards,

Greg


Previous by date: 10 May 2006 07:12:49 +0100 Re: TinyGL0.4 linking issues, Greg Haerr
Next by date: 10 May 2006 07:12:49 +0100 How to use animated gifs?, ofi
Previous in thread: 10 May 2006 07:12:49 +0100 Alpha channel whit nano-x 0.91, Marco Rossi
Next in thread:


Powered by ezmlm-browse 0.20.