quick opengl 2d quad question

Post: #1
is it possible to apply an alpha mask to a texture before rendering it to the screen? I'm using opengl for 2d purposes. I would have a seperate texture to represent the alpha channel, i guess...
Quote this message in a reply
Posts: 608
Joined: 2002.04
Post: #2
Unless you are using rectangle textures (non-POT), then the values passed glTexCoord will always refer to percentages of the texture. Of course, if you know the texture's width and height you could figure out the percentage that would equal a certain number of pixels.
Quote this message in a reply
Posts: 1,234
Joined: 2002.10
Post: #3
All hardware that OS X supports has as least two texture units, so you could bind your alpha texture to the second unit and use multitexturing to perform the masking.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Y value of a point on a quad evenmybird 5 3,880 Aug 6, 2006 02:32 PM
Last Post: OneSadCookie
  Quick question, will glCopyTexSubImage2D with with RECT textures? TomorrowPlusX 28 9,549 Jun 8, 2006 07:04 PM
Last Post: akb825
  Quad Vertex Array Woes WakingJohn 1 2,491 Apr 9, 2005 07:55 PM
Last Post: WakingJohn
  Turn a Quad into particles MACnus 10 7,112 Feb 6, 2005 09:10 AM
Last Post: Duane
  Quad Collision-Detection Duane 5 5,582 Jan 18, 2005 01:42 PM
Last Post: Duane