Changing the Mask in OpenGL

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);

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
Twitter: @kylerichter
Quote this message in a reply
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
Posts: 613
Joined: 2004.09
Post: #3
Duh yea thanks unknown that slipped my mind completely. It will work perfectly. =D

Kyle Richter
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 15,658 May 20, 2011 12:23 AM
Last Post: g00se
  Changing Pixel Values using CG LIPH700 1 6,073 Nov 25, 2010 03:17 PM
Last Post: SethWillits
  Lighting and changing texture colors in OpenGL agreendev 2 10,963 Aug 13, 2010 03:47 PM
Last Post: agreendev
  Pasting an image with alpha mask on a texture Najdorf 10 9,157 Jun 24, 2008 03:23 PM
Last Post: Najdorf
  3D animation/morphing/texture changing wyrmmage 7 6,514 Dec 31, 2006 10:30 AM
Last Post: Leisure Suit Lurie