Changing the Mask in OpenGL

Moderator
Posts: 613
Joined: 2004.09
Post: #1
Im sure there is a better way to label this but I cant think of it right now. What I am looking for is a way to fade out a texture using the alpha channel or another method.

Ive looked around and cant seem to find a method in OpenGL to change the mask values. Im sure there is something I can use to directly effect my PNG texture but I rather stay away from that if it is at all possible.

Im looking for something that works like this
glBindTexture(GL_TEXTURE_2D, tex);
fadeAlphaTof(0.9f);

I guess thats a little much to be looking for but hopefully there is something close out there that I am missing.

Thanks Guys, I look foward to your wisdom!

(Edit) PS: It dosnt matter if I fade the entire mask in one uniformed fashion if that makes it any easier.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #2
glColor4f(1, 1, 1, alpha);
before drawing the texture

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #3
Duh yea thanks unknown that slipped my mind completely. It will work perfectly. =D

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Edge detection with sobel operator/mask g00se 5 11,072 May 20, 2011 12:23 AM
Last Post: g00se
  Changing Pixel Values using CG LIPH700 1 4,643 Nov 25, 2010 03:17 PM
Last Post: SethWillits
  Lighting and changing texture colors in OpenGL agreendev 2 7,888 Aug 13, 2010 03:47 PM
Last Post: agreendev
  Pasting an image with alpha mask on a texture Najdorf 10 5,996 Jun 24, 2008 03:23 PM
Last Post: Najdorf
  Effifcient State Changing Nick 7 3,650 Apr 6, 2006 06:33 AM
Last Post: TomorrowPlusX