Single pass ALPHA Texutre + DIFFUSE COLOR?

Started by
0 comments, last by dpadam450 10 years, 8 months ago

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!

Advertisement

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

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement