quick opengl 2d quad question

dave05
Unregistered
 
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
Moderator
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
Sage
Posts: 1,232
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,651 Aug 6, 2006 02:32 PM
Last Post: OneSadCookie
  Quick question, will glCopyTexSubImage2D with with RECT textures? TomorrowPlusX 28 8,895 Jun 8, 2006 07:04 PM
Last Post: akb825
  Quad Vertex Array Woes WakingJohn 1 2,348 Apr 9, 2005 07:55 PM
Last Post: WakingJohn
  Turn a Quad into particles MACnus 10 6,657 Feb 6, 2005 09:10 AM
Last Post: Duane
  Quad Collision-Detection Duane 5 5,257 Jan 18, 2005 01:42 PM
Last Post: Duane