grayscale loaded as gl_alpha: the opaque image can be only white?

Posts: 164
Joined: 2010.10
Post: #1
hi, i have a grayscale image loaded as gl_alpha:
1) where the image is black what is displayed is white
2) where the image is gray what is displayed is partially transparent
3) where the image is white what is displayed is fully transparent.
i'm wondering if the image that must be opaque (1) can be diaplyed with a different color instead of white
Quote this message in a reply
Posts: 1,482
Joined: 2002.09
Post: #2
Change the drawing color before drawing the texture. (i.e. glColor*() or sprite.color in Cocos2D)

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Posts: 164
Joined: 2010.10
Post: #3
very nice!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Get white and brilliant teeth! michaelherri 0 2 Yesterday 11:39 PM
Last Post: michaelherri
  grayscale loaded as gl_alpha: all texture is white sefiroths 2 5,623 Jan 18, 2011 12:34 AM
Last Post: sefiroths
  Drawing a subview loaded from a bundle Joseph Duchesne 8 5,492 Feb 14, 2006 08:32 PM
Last Post: PowerMacX
  NSView loaded from bundle won't draw... Joseph Duchesne 1 3,595 Feb 12, 2006 03:33 AM
Last Post: Cochrane