Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > BLending and Tr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 4815 of 5017
Post > Topic >>

BLending and Transparency

by karim.atiki@[EMAIL PROTECTED] Jun 28, 2008 at 11:14 AM

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 ?

Thanks.

Zyend
 




 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
tan12V112 Fri Nov 21 6:12:35 CST 2008.