quick opengl 2d quad question
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...
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Y value of a point on a quad | evenmybird | 5 | 3,187 |
Aug 6, 2006 02:32 PM Last Post: OneSadCookie |
|
| Quick question, will glCopyTexSubImage2D with with RECT textures? | TomorrowPlusX | 28 | 7,952 |
Jun 8, 2006 07:04 PM Last Post: akb825 |
|
| Quad Vertex Array Woes | WakingJohn | 1 | 2,058 |
Apr 9, 2005 07:55 PM Last Post: WakingJohn |
|
| Turn a Quad into particles | MACnus | 10 | 5,946 |
Feb 6, 2005 09:10 AM Last Post: Duane |
|
| Quad Collision-Detection | Duane | 5 | 4,601 |
Jan 18, 2005 01:42 PM Last Post: Duane |
|

