Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Single pass ALPHA Texutre + DIFFUSE COLOR?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Samurai Jack   Members   -  Reputation: 223

Like
0Likes
Like

Posted 31 July 2013 - 08:56 AM

Hello!

 

My problem is as follows:

 

1. I have a 32 BIT RGBA texture with colors and ALPHA. The texture contains a logo.

2. I would like to draw the logo transparent on a QUAD which is solid and SIGNLE color. I use:
 

glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);

3. The logo gets drawn, but it is TRANSPARENT. It ignores any BACKGROUND color I would like to use.

 

So to simplify, I can avoid the problem by:

1. Draw a QUAD of signle color without texturing

2. Draw the QUAD again with ALPHA texture

 

Why do I have to draw 2 times? Is there a way, I would provide color either glColor or glMaterial and use it in single pass?

I do not use any shaders. Fixed function pipeline ONLY. I have read something about glTexEnv but I do not understand it.

 

Feel free to post.

Thank you in advance!

 



Sponsor:

#2 dpadam450   Members   -  Reputation: 933

Like
0Likes
Like

Posted 31 July 2013 - 12:13 PM

glColor4f(1,1,1,1) before drawing. What do you mean it is transparent? fully or partially?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS