Blending and Images...

Posts: 321
Joined: 2004.10
Post: #1
I have successfully blended geometric squares with glBlendFunc() and
glColor4f(_,_,_,alpha) and have run them through the gamut of transparency and

However, the Red Book in Chap. 6, in "Sample Uses of Blending" has several
bullets where it discusses "images".

For instance, the 2nd bullet says "To blend three different images equally,
set... Draw each of the images with alpha equal to 0.33333... each image is
only one-third of its original ...."

Does the term "image" here mean a geographic image (for instance, glBegin(GL_TRIANGLES), glVertex()..etc. ) or does it mean an image as
defined in Chapter 8 (for instacne glDrawPixels() )?

If not, then is it possible to adjust the transpaency of an image (i.e. Chapter 8, rectangular arrays of pixels) through some other mechanism?

And just to be complete, It is possible to change the alpha of a texture via
because there are glVertex() commands with the glTexCoord() commands and
thus glColor4() can be used. Right?

Quote this message in a reply
Posts: 156
Joined: 2002.11
Post: #2
I think, in that case, an image means a texture applied to a triangle, or quad. If you draw three triangles on the same spot, each with the alpha part of glColor set to 0.33, each triangle with a different texture, you'll have a blend of the three images as a result.

You may also use textures with an alpha channel, loaded from a PNG or a TGA file.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  general blending versus texture blending questions WhatMeWorry 2 7,475 Dec 7, 2006 02:43 PM
Last Post: arekkusu