Talk About Network

Google





Graphics > OpenGL 3D API > Re: BLending an...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 4815 of 5061
Post > Topic >>

Re: BLending and Transparency

by Andy V <nobody@[EMAIL PROTECTED] > Jun 28, 2008 at 07:20 PM

karim.atiki@[EMAIL PROTECTED]
 wrote:
> Hi all,
> 
> I'm experiencing a strange issue.
> I display an image which is a textured quad in RGB format.
> 
> I try to display a transparent rectangle over it.
> I use the following code:
> 
> glPushMatrix();
>   glEnable(GL_BLEND);
>    glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
>     glColor4d(0.0, 0.0, 1.0, 0.5);
>     glRecti(rc.left(), rc.top(), rc.right(), rc.bottom());
>   glDisable(GL_BLEND);
> glPopMatrix();
> 
> It works fine.
> But with some images, the rectangle is not transparent blue, but BLACK
> transparent...
> And I just can't figure out what's the trick.
> It is a simple PNG image (RGB) and it is just well displayed on scrren
> though.
> 
> Any idea or suggestion ?

As a wild guess, do you need to disable texture mapping?

--
Andy V
 




 6 Posts in Topic:
BLending and Transparency
karim.atiki@[EMAIL PROTEC  2008-06-28 11:14:27 
Re: BLending and Transparency
karim.atiki@[EMAIL PROTEC  2008-06-28 11:52:11 
Re: BLending and Transparency
Andy V <nobody@[EMAIL   2008-06-28 19:20:48 
Re: BLending and Transparency
karim.atiki@[EMAIL PROTEC  2008-06-29 00:20:24 
Re: BLending and Transparency
Wolfgang Draxinger <wd  2008-06-29 12:28:29 
Re: BLending and Transparency
karim.atiki@[EMAIL PROTEC  2008-06-29 03:57:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 12:40:38 PST 2009.