[cairo] Fwd: Re: [Mesa3d-dev] Points in Cairo Glitz paper

Jon Smirl jonsmirl at yahoo.com
Sun Apr 25 14:15:39 PDT 2004


--- "Marcelo E. Magallon" <mmagallo at debian.org> wrote:
> From: "Marcelo E. Magallon" <mmagallo at debian.org>
> To: mesa3d-dev <mesa3d-dev at lists.sourceforge.net>
> Subject: Re: [Mesa3d-dev] Points in Cairo Glitz paper
> Date: Sun, 25 Apr 2004 11:01:44 -0600
> 
> On Wed, Apr 21, 2004 at 08:11:53AM -0700, Jon Smirl wrote:
> 
>  > The best way to do this would be to perform compositing with a mask
>  > surface directly without the creation of an intermediate surface.
>  > Even though the fixed OpenGL pipeline does not seem to allow for such
>  > an operation, glitz is able to do this on hardware that supports
>  > fragment programs.
> 
>  Hmm...
> 
>  Glitz does this:
> 
>     !!ARBfp1.0
>     TEMP color;
> 
>     /* temporary */
>     TEMP mask;
> 
>     /* src texture */
>     TEX color, fragment.texcoord[0], texture[0], 2D;
> 
>     /* pd operation */
>     TEX mask, fragment.texcoord[1], texture[1], 2D;
>     MUL result.color, color, mask.a;
> 
>     END
> 
>  which can also be expressed in OpenGL as:
> 
>     glActiveTexture(GL_TEXTURE0_ARB);
>     glEnable(GL_TEXTURE_2D);
>     glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
>     glActiveTexture(GL_TEXTURE1_ARB);
>     glEnable(GL_TEXTURE_2D);
>     glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
> 
>  by loading the mask in GL_LUMINANCE format and binding the object to
>  texture unit 1.
> 
>  I didn't take a closer look at the convolution operation and I'm not
>  sure if the imaging extensions are capable of providing equal
>  functionality.
> 
> -- 
> Marcelo
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
> For a limited time only, get FREE Ground shipping on all orders of $35
> or more. Hurry up and shop folks, this offer expires April 30th!
> http://www.thinkgeek.com/freeshipping/?cpg=12297
> _______________________________________________
> Mesa3d-dev mailing list
> Mesa3d-dev at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


=====
Jon Smirl
jonsmirl at yahoo.com


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash




More information about the cairo mailing list